mirror of
https://github.com/mue/mue.git
synced 2026-07-18 22:44:08 +02:00
build: cleanup webpack config
This commit is contained in:
31
webpack.prod.js
Normal file
31
webpack.prod.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
output: {
|
||||
path: path.resolve(__dirname, './build'),
|
||||
filename: '[name].[chunkhash].js',
|
||||
chunkFilename: '[id].[chunkhash].chunk.js',
|
||||
clean: true
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.resolve(__dirname, './public/index.html')
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [{
|
||||
from: 'public/icons',
|
||||
to: 'icons'
|
||||
},
|
||||
{
|
||||
from: 'public/offline-images',
|
||||
to: 'offline-images'
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user