Skip to content

Commit ac612f9

Browse files
committed
fix: Incorrect regex in polyfill name replacement
1 parent 7c8840f commit ac612f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export default class OptimizePlugin {
248248
async generatePolyfillsChunk (polyfills, cwd, timings) {
249249
const ENTRY = '\0entry';
250250

251-
const entryContent = polyfills.reduce((str, p) => `${str}\nimport "${p.replace('.js', '')}";`, '');
251+
const entryContent = polyfills.reduce((str, p) => `${str}\nimport "${p.replace('.js$', '')}";`, '');
252252

253253
const COREJS = require.resolve('core-js/package.json').replace('package.json', '');
254254
const isCoreJsPath = /(?:^|\/)core-js\/(.+)$/;

0 commit comments

Comments
 (0)