Add mode to webpack config
This commit is contained in:
parent
6321539711
commit
0be97285db
|
@ -2,6 +2,7 @@ const { resolve, join } = require('path')
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
mode: 'development',
|
||||||
devtool: 'cheap-eval-source-map',
|
devtool: 'cheap-eval-source-map',
|
||||||
context: resolve(__dirname, 'src'),
|
context: resolve(__dirname, 'src'),
|
||||||
entry: {
|
entry: {
|
||||||
|
|
|
@ -2,6 +2,7 @@ const { resolve, join } = require('path')
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
mode: 'production',
|
||||||
context: resolve(__dirname, 'src'),
|
context: resolve(__dirname, 'src'),
|
||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
|
@ -30,7 +31,7 @@ const config = {
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
modules: true,
|
modules: true,
|
||||||
importLoaders: 1,
|
importLoaders: 2,
|
||||||
localIdentName: '[name]__[local]___[hash:base64:5]'
|
localIdentName: '[name]__[local]___[hash:base64:5]'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue