aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
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'
+ }
+ ]),
],
-};
+});