mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-22 00:40:26 +08:00
Set dynamic webpack import path (#208)
* Set dynamic webpack import path * Cleanup
This commit is contained in:
committed by
GitHub
parent
0cefd5ddef
commit
479412888d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -27,6 +27,7 @@ THE SOFTWARE.
|
||||
const path = require('path');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
|
||||
const WebpackRequireFrom = require('webpack-require-from');
|
||||
|
||||
module.exports = {
|
||||
publicPath: './',
|
||||
@@ -38,6 +39,7 @@ module.exports = {
|
||||
plugins: [
|
||||
process.argv.includes('--analyze') && new BundleAnalyzerPlugin(),
|
||||
process.argv.includes('--analyze') && new DuplicatePackageCheckerPlugin(),
|
||||
new WebpackRequireFrom({ replaceSrcMethodName: '__replaceWebpackDynamicImport' }),
|
||||
].filter(x => !!x),
|
||||
},
|
||||
chainWebpack: config => {
|
||||
|
Reference in New Issue
Block a user