mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Add webpack and script build:resources to build into resources/html and generate manifest!
This commit is contained in:
1 parent
515ab67b3c
commit
1838de04ba
8 files changed
+687
-34
No files matched your search
@@ -0,0 +1,35 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const ResourceManifestPlugin = require('./webpack.fxmanifest.plugin');
|
||||
|
||||
module.exports = require('./webpack.common')({
|
||||
mode: 'production',
|
||||
|
||||
// In production, we skip all hot-reloading stuff
|
||||
entry: [path.join(process.cwd(), 'src/index.js')],
|
||||
|
||||
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(),
|
||||
],
|
||||
|
||||
performance: {
|
||||
assetFilter: assetFilename =>
|
||||
!/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename),
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user