From 9f92bba036860c61277d252a39a5417f67231bc1 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 10 Oct 2018 21:54:27 +0200 Subject: Use webpack-merge. Move html export config to own file. Delete unnecessary config options. Use cheap source maps. Signed-off-by: David Mehren --- webpack.htmlexport.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 webpack.htmlexport.js (limited to 'webpack.htmlexport.js') 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' + }) + ] +} -- cgit v1.2.3