Migrate to webpack 4
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
module.exports = {
|
||||
|
||||
// Some plugins cause errors on the app, so use few plugins.
|
||||
// https://webpack.js.org/concepts/mode/#mode-production
|
||||
mode: isProduction ? 'none' : 'development',
|
||||
plugins: isProduction ? [
|
||||
new webpack.DefinePlugin({'process.env.NODE_ENV': JSON.stringify('production')}),
|
||||
] : [],
|
||||
devtool: isProduction ? false : '#inline-source-map',
|
||||
};
|
||||
|
Reference in New Issue
Block a user