Skip to content

Commit 04b9809

Browse files
committed
build(napi/oxlint): do not extern constants.mjs (#13696)
Surprisingly, TSDown inlines the constants from `constants.mjs` into the bundled code, regardless of whether the file is listed as `external` in TSDown config. So remove it from `external` list and don't copy the file into `dist`.
1 parent 2751193 commit 04b9809

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

napi/oxlint/scripts/build.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ const oxlintDirPath = join(import.meta.dirname, '..'),
1010
console.log('Building with tsdown...');
1111
execSync('pnpm tsdown', { stdio: 'inherit', cwd: oxlintDirPath });
1212

13-
// Copy generated constants file
14-
console.log('Copying generated files...');
15-
copyFile(join(oxlintDirPath, 'src-js/generated/constants.mjs'), join(distDirPath, 'generated/constants.mjs'));
16-
1713
// Copy files from `napi/parser` to `napi/oxlint/dist/parser`
1814
console.log('Copying files from parser...');
1915

napi/oxlint/tsdown.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export default defineConfig({
1212
// External native bindings
1313
'./oxlint.*.node',
1414
'oxlint-*',
15-
// External the generated constants file - we'll copy it separately
16-
'./generated/constants.mjs',
1715
// These are generated (also used by oxc-parser, so we'll copy them separately)
1816
/..\/parser\/.*/,
1917
],

0 commit comments

Comments
 (0)