aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-02-10 01:39:31 -0500
committerDeterminant <ted.sybil@gmail.com>2019-02-10 01:39:31 -0500
commite5729baa785c3a85d02d8315817e3a57f7c5fcb9 (patch)
tree632f9a2210d7e3dae4790b1f0c50744536a809fb /webpack.config.js
parent735d8e5aa8b590b37a16c0e1b52a688c43dd5c10 (diff)
popup works
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 5c387ee..a572650 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,7 +2,7 @@ const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
-module.exports = {
+module.exports = (env, argv) => ({
entry: {
index: "./src/index.js",
background: "./src/background.js",
@@ -17,9 +17,7 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules/,
- use: {
- loader: "babel-loader"
- },
+ use: ['babel-loader', 'eslint-loader']
},
{
test: /\.css$/,
@@ -42,5 +40,11 @@ module.exports = {
new CopyWebpackPlugin([
{from:'./public/', to:'./'}
]),
+ new CopyWebpackPlugin([
+ {
+ from: argv.mode == 'production' ? './manifest.prod.json' : './manifest.dev.json',
+ to: './manifest.json'
+ }
+ ]),
],
-};
+});