-
Notifications
You must be signed in to change notification settings - Fork 262
Expand file tree
/
Copy pathwebpack.prod.js
More file actions
25 lines (22 loc) · 787 Bytes
/
webpack.prod.js
File metadata and controls
25 lines (22 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const webpackMerge = require('webpack-merge');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const Visualizer = require('webpack-visualizer-plugin');
const path = require('path');
const commonConfig = require('./webpack.common.js');
const ENV = 'prod';
module.exports = webpackMerge(commonConfig({ env: ENV }), {
devtool: 'source-map',
output: {
path: path.resolve('./target/www'),
filename: 'app/[hash].[name].bundle.js',
chunkFilename: 'app/[hash].[id].chunk.js'
},
plugins: [
new ExtractTextPlugin('[hash].styles.css'),
new Visualizer({
// Webpack statistics in target folder
filename: '../stats.html'
})
]
});