Add mode to webpack config

This commit is contained in:
LordMathis 2018-05-10 10:48:39 +02:00
parent 6321539711
commit 0be97285db
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ const { resolve, join } = require('path')
const webpack = require('webpack')
const config = {
mode: 'development',
devtool: 'cheap-eval-source-map',
context: resolve(__dirname, 'src'),
entry: {

View File

@ -2,6 +2,7 @@ const { resolve, join } = require('path')
const webpack = require('webpack')
const config = {
mode: 'production',
context: resolve(__dirname, 'src'),
entry: {
bundle: [
@ -30,7 +31,7 @@ const config = {
loader: 'css-loader',
options: {
modules: true,
importLoaders: 1,
importLoaders: 2,
localIdentName: '[name]__[local]___[hash:base64:5]'
}
},