dont split chunks, fix process

This commit is contained in:
daniel-j 2021-12-10 12:50:21 +01:00
parent 819ad4eca3
commit 19ee93ab23
4 changed files with 6 additions and 7 deletions

View file

@ -18,7 +18,7 @@
"content_scripts": [ "content_scripts": [
{ {
"matches": ["https://www.fimfiction.net/*", "https://fimfiction.net/*"], "matches": ["https://www.fimfiction.net/*", "https://fimfiction.net/*"],
"js": ["build/vendors-node_modules_autosize_dist_autosize_js-node_modules_font-awesome_fonts_fontawesome-we-7f0b12.js", "build/fimfic2epub.js"], "js": ["build/fimfic2epub.js"],
"css": ["inject.css"] "css": ["inject.css"]
} }
], ],

1
package-lock.json generated
View file

@ -65,6 +65,7 @@
"node-loader": "^2.0.0", "node-loader": "^2.0.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"plugin-error": "^1.0.1", "plugin-error": "^1.0.1",
"process": "^0.11.10",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"regenerator-runtime": "^0.13.7", "regenerator-runtime": "^0.13.7",
"removeNPMAbsolutePaths": "^2.0.0", "removeNPMAbsolutePaths": "^2.0.0",

View file

@ -75,6 +75,7 @@
"node-loader": "^2.0.0", "node-loader": "^2.0.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"plugin-error": "^1.0.1", "plugin-error": "^1.0.1",
"process": "^0.11.10",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"regenerator-runtime": "^0.13.7", "regenerator-runtime": "^0.13.7",
"removeNPMAbsolutePaths": "^2.0.0", "removeNPMAbsolutePaths": "^2.0.0",

View file

@ -69,7 +69,8 @@ const bundleExtensionConfig = {
plugins: [ plugins: [
// new (require('webpack-bundle-analyzer').BundleAnalyzerPlugin)() // new (require('webpack-bundle-analyzer').BundleAnalyzerPlugin)()
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'] Buffer: ['buffer', 'Buffer'],
process: 'process/browser'
}) })
], ],
performance: { performance: {
@ -77,11 +78,7 @@ const bundleExtensionConfig = {
}, },
optimization: { optimization: {
concatenateModules: inProduction, concatenateModules: inProduction,
minimize: inProduction, minimize: inProduction
splitChunks: {
chunks: 'all',
automaticNameDelimiter: '_'
}
}, },
devtool: 'source-map', devtool: 'source-map',
mode: inProduction ? 'production' : 'development' mode: inProduction ? 'production' : 'development'