mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-21 19:34:19 +01:00
32 lines
946 B
JavaScript
32 lines
946 B
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 UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
|
|
|
module.exports = merge(config, {
|
|
mode: 'production',
|
|
optimization: {
|
|
minimizer: [
|
|
new UglifyJsPlugin({
|
|
cache: true,
|
|
parallel: true,
|
|
}),
|
|
new OptimizeCSSAssetsPlugin({}),
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
minify: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
},
|
|
inlineSource: '.(js|css)$',
|
|
template: 'index.html',
|
|
}),
|
|
new HtmlWebpackInlineSourcePlugin(),
|
|
]
|
|
});
|