Skip to content

Commit 45345d7

Browse files
author
Rich Harris
committed
simplify
1 parent 0008d51 commit 45345d7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

scripts/create-common-bundle/index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,14 @@ for (const file of glob('**', { cwd, filesOnly: true, dot: true }).map((file) =>
3535
continue;
3636
}
3737

38-
// esbuild is a special case
39-
if (file.startsWith('node_modules/esbuild-wasm/')) {
40-
zip.addFile(
41-
file.replace('node_modules/esbuild-wasm', 'node_modules/esbuild'),
42-
fs.readFileSync(`${cwd}/${file}`)
43-
);
44-
continue;
45-
} else if (file.startsWith('node_modules/esbuild') || file.startsWith('node_modules/@esbuild')) {
38+
if (file.startsWith('node_modules/esbuild/') || file.startsWith('node_modules/@esbuild/')) {
4639
continue;
4740
}
4841

49-
zip.addFile(file, fs.readFileSync(`${cwd}/${file}`));
42+
zip.addFile(
43+
file.replace('node_modules/esbuild-wasm/', 'node_modules/esbuild/'),
44+
fs.readFileSync(`${cwd}/${file}`)
45+
);
5046
}
5147

5248
if (ignored_files.size > 0) {

0 commit comments

Comments
 (0)