We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NormalModuleReplacementPlugin
1 parent b121e8c commit 57f566fCopy full SHA for 57f566f
webpack.config.mjs
@@ -20,7 +20,7 @@ const commonConfig = {
20
output: { path: path.join(__dirname, 'dist') },
21
node: { __dirname: false, __filename: false },
22
plugins: [
23
- new webpack.NormalModuleReplacementPlugin(/.*\/+.+\.js$/, (resource) => {
+ new webpack.NormalModuleReplacementPlugin(/^\S+\/\S+\.js$/, (resource) => {
24
// eslint-disable-next-line no-param-reassign
25
resource.request = resource.request.replace(/\.js$/, '');
26
}),
0 commit comments