Skip to content

Commit 57f566f

Browse files
committed
Update regex for NormalModuleReplacementPlugin
1 parent b121e8c commit 57f566f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webpack.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const commonConfig = {
2020
output: { path: path.join(__dirname, 'dist') },
2121
node: { __dirname: false, __filename: false },
2222
plugins: [
23-
new webpack.NormalModuleReplacementPlugin(/.*\/+.+\.js$/, (resource) => {
23+
new webpack.NormalModuleReplacementPlugin(/^\S+\/\S+\.js$/, (resource) => {
2424
// eslint-disable-next-line no-param-reassign
2525
resource.request = resource.request.replace(/\.js$/, '');
2626
}),

0 commit comments

Comments
 (0)