This commit is contained in:
Antti Pilto 2019-12-06 15:06:54 +02:00
parent dca69dda9c
commit 3960f376dc
2 changed files with 66 additions and 68 deletions

View file

@ -1,6 +1,7 @@
const HtmlWebPackPlugin = require('html-webpack-plugin'); const HtmlWebPackPlugin = require('html-webpack-plugin');
module.exports = { module.exports = {
mode: 'development',
resolve: { resolve: {
extensions: ['.js', '.jsx'] extensions: ['.js', '.jsx']
}, },

View file

@ -3,10 +3,8 @@ const webpack = require('webpack');
const path = require('path'); const path = require('path');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
module.exports = env => { module.exports = {
const mode = env.mode ? env.mode : "production"; mode: 'production',
return {
mode,
entry: { entry: {
main: './src/index.js' main: './src/index.js'
}, },
@ -72,4 +70,3 @@ module.exports = env => {
] ]
} }
}; };
};