Use src/ imports in addons; bundle test output via esbuild
Addons no longer import from out/ or out-esbuild in source. TypeScript and editors resolve ../../../src/common|browser directly. Addon unit test artifacts bundle those dependencies from source (platform node, npm packages external). Reverts preserveConstEnums; const enums are handled in bundled output. Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Imms
parent
07bdaf8767
commit
18100d32fb
+10
-3
@@ -107,13 +107,20 @@ if (config.addon) {
|
||||
};
|
||||
outConfig = {
|
||||
...outConfig,
|
||||
bundle: true,
|
||||
platform: 'node',
|
||||
packages: 'external',
|
||||
entryPoints: [`addons/addon-${config.addon}/src/**/*.ts`],
|
||||
outdir: `addons/addon-${config.addon}/out-esbuild/`
|
||||
outdir: `addons/addon-${config.addon}/out-esbuild/`,
|
||||
// Public API stays external; src/common|browser are bundled from source.
|
||||
external: ['@xterm/xterm', '@xterm/headless', '@xterm/addon-*'],
|
||||
};
|
||||
// Playwright suites only (not run by unit tests); keep unbundled.
|
||||
outTestConfig = {
|
||||
...outConfig,
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
entryPoints: [`addons/addon-${config.addon}/test/**/*.ts`],
|
||||
outdir: `addons/addon-${config.addon}/out-esbuild-test/`
|
||||
outdir: `addons/addon-${config.addon}/out-esbuild-test/`,
|
||||
};
|
||||
|
||||
if (config.addon === 'ligatures') {
|
||||
|
||||
Reference in New Issue
Block a user