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>
This commit is contained in:
25
webpack.htmlexport.js
Normal file
25
webpack.htmlexport.js
Normal file
@@ -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'
|
||||
})
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user