diff options
author | Christoph (Sheogorath) Kern | 2018-10-10 23:38:13 +0200 |
---|---|---|
committer | GitHub | 2018-10-10 23:38:13 +0200 |
commit | bf525e43d4b1806b0a99f7c145a16087de7438fa (patch) | |
tree | bcb2a81120b3754e819db654ef7a5d7c7051d884 /webpack.prod.js | |
parent | c7478c1694be2b3b880b8d52f9c15d60832a06f8 (diff) | |
parent | 7eed584c0197d0b5a93f58f8b645c0b84588d8e1 (diff) |
Merge pull request #1007 from davidmehren/webpack-4
Webpack 4 refactor & docs
Diffstat (limited to '')
-rw-r--r-- | webpack.prod.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/webpack.prod.js b/webpack.prod.js new file mode 100644 index 00000000..188d9881 --- /dev/null +++ b/webpack.prod.js @@ -0,0 +1,23 @@ +const common = require('./webpack.common.js') +const htmlexport = require('./webpack.htmlexport') +const merge = require('webpack-merge') +const path = require('path') +const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') + +module.exports = [ + merge(common, { + mode: 'production', + output: { + path: path.join(__dirname, 'public/build'), + publicPath: '/build/', + filename: '[name].[contenthash].js' + } + }), + merge(htmlexport, { + mode: 'production', + optimization: { + minimizer: [ + new OptimizeCSSAssetsPlugin({}) + ] + } + })] |