Skip to content

Commit 75f8a85

Browse files
committed
no array
1 parent 9739305 commit 75f8a85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev-packages/rollup-utils/npmHelpers.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
2626

2727
const packageDotJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' }));
2828

29-
const ignoreSideEffects = [/[\\\/]debug-build\.ts$/];
29+
const ignoreSideEffects = /[\\\/]debug-build\.ts$/;
3030

3131
export function makeBaseNPMConfig(options = {}) {
3232
const {
@@ -87,7 +87,7 @@ export function makeBaseNPMConfig(options = {}) {
8787

8888
treeshake: {
8989
moduleSideEffects: (id, external) => {
90-
return external === false && ignoreSideEffects.some(regex => regex.test(id));
90+
return external === false && ignoreSideEffects.test(id);
9191
}
9292
},
9393

0 commit comments

Comments
 (0)