mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const ResourceManifestPlugin = require('./webpack.fxmanifest.plugin');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = require('./webpack.common')({
|
|
mode: 'production',
|
|
|
|
// In production, we skip all hot-reloading stuff
|
|
entry: [path.join(process.cwd(), 'src/index.tsx')],
|
|
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: 'public/index.html',
|
|
minify: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
removeRedundantAttributes: true,
|
|
useShortDoctype: true,
|
|
removeEmptyAttributes: true,
|
|
removeStyleLinkTypeAttributes: true,
|
|
keepClosingSlash: true,
|
|
minifyJS: true,
|
|
minifyCSS: true,
|
|
minifyURLs: true,
|
|
},
|
|
inject: true,
|
|
}),
|
|
new ResourceManifestPlugin(),
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{
|
|
from: 'public/media',
|
|
to: path.resolve(process.cwd(), '../resources/html/media'),
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
|
|
performance: {
|
|
assetFilter: (assetFilename) =>
|
|
!/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename),
|
|
},
|
|
});
|