diff options
author | David Mehren | 2018-10-10 21:54:27 +0200 |
---|---|---|
committer | David Mehren | 2018-10-10 22:09:46 +0200 |
commit | 9f92bba036860c61277d252a39a5417f67231bc1 (patch) | |
tree | 2e66c92dd963efac07b9a93b7b7f09852fc8d481 /webpack.htmlexport.js | |
parent | 9a2dcd40d37c01896deeae0c8059564b4bdd6dc1 (diff) |
Use webpack-merge.
Move html export config to own file.
Delete unnecessary config options.
Use cheap source maps.
Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'webpack.htmlexport.js')
-rw-r--r-- | webpack.htmlexport.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/webpack.htmlexport.js b/webpack.htmlexport.js new file mode 100644 index 00000000..dd6f4c01 --- /dev/null +++ b/webpack.htmlexport.js @@ -0,0 +1,25 @@ +const MiniCssExtractPlugin = require('mini-css-extract-plugin') +const path = require('path') + +module.exports = { + name: 'save-as-html', + entry: { + htmlExport: path.join(__dirname, 'public/js/htmlExport.js') + }, + module: { + rules: [{ + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, 'css-loader'] + }] + }, + output: { + path: path.join(__dirname, 'public/build'), + publicPath: '/build/', + filename: '[name].js' + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: 'html.min.css' + }) + ] +} |