mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-21 19:34:19 +01:00
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
const merge = require('webpack-merge');
|
|
const config = require('./webpack.config.js');
|
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
|
|
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
|
|
module.exports = merge(config, {
|
|
mode: 'production',
|
|
optimization: {
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
sourceMap: true
|
|
}),
|
|
new OptimizeCSSAssetsPlugin({
|
|
cssProcessorOptions: {
|
|
map: {
|
|
inline: false,
|
|
annotation: true
|
|
}
|
|
}
|
|
}),
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
minify: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
},
|
|
inlineSource: '.(js|css)$',
|
|
template: 'index.html',
|
|
}),
|
|
new HtmlWebpackInlineSourcePlugin(),
|
|
]
|
|
});
|