2018-10-10 15:54:27 -04:00
|
|
|
const common = require('./webpack.common.js')
|
|
|
|
const htmlexport = require('./webpack.htmlexport')
|
2021-05-05 07:37:47 -04:00
|
|
|
const { merge } = require('webpack-merge')
|
2018-10-10 15:54:27 -04:00
|
|
|
const path = require('path')
|
2018-07-03 16:47:50 -04:00
|
|
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
2021-05-05 07:37:47 -04:00
|
|
|
const { ESBuildMinifyPlugin } = require('esbuild-loader')
|
2016-10-11 03:45:00 -04:00
|
|
|
|
2018-10-10 15:54:27 -04:00
|
|
|
module.exports = [
|
|
|
|
merge(common, {
|
|
|
|
mode: 'production',
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'public/build'),
|
2019-12-19 12:00:51 -05:00
|
|
|
publicPath: 'build/',
|
2018-10-10 15:54:27 -04:00
|
|
|
filename: '[name].[contenthash].js'
|
2021-05-05 07:37:47 -04:00
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimizer: [
|
|
|
|
new ESBuildMinifyPlugin({
|
|
|
|
target: 'es2015'
|
|
|
|
})
|
|
|
|
]
|
2018-07-02 16:24:56 -04:00
|
|
|
}
|
2018-10-10 15:54:27 -04:00
|
|
|
}),
|
|
|
|
merge(htmlexport, {
|
|
|
|
mode: 'production',
|
|
|
|
optimization: {
|
|
|
|
minimizer: [
|
|
|
|
new OptimizeCSSAssetsPlugin({})
|
2018-07-02 16:24:56 -04:00
|
|
|
]
|
2018-10-10 15:54:27 -04:00
|
|
|
}
|
|
|
|
})]
|