Files
tripleo-ui/webpack.dev.js
Honza Pokorny 8d47410fe5 Run minification and tree shaking on build
"npm run build" now builds an artifact optimized for production use.  The
removes dead code, and minizes the result.  The size of the bundle shrinks from
about 14MB to 2MB.

The previous build command is moved to "npm run build:dev".

Change-Id: I21430f06049c4eeeb4a66c7143da8c2919fb5a24
Closes-Bug: 1688610
2017-05-24 09:36:45 -03:00

25 lines
538 B
JavaScript

const webpack = require('webpack');
const merge = require('webpack-merge');
const CommonConfig = require('./webpack.common.js');
module.exports = env => {
return merge(CommonConfig, {
devtool: 'source-map',
devServer: {
contentBase: './dist',
host: '0.0.0.0',
port: 3000,
stats: {
colors: true
},
historyApiFallback: true,
inline: true
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
})
]
});
};