Skip to content

Commit caa505a

Browse files
authored
chore: add mocha to external (#5746)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Chores** * Updated build configuration files across packages to refine output paths and bundling behavior. * Bumped tsdown dependency to version 0.18.2. * Added configuration exclusions to optimize the build compilation process. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent a0cd3bb commit caa505a

File tree

10 files changed

+41
-26
lines changed

10 files changed

+41
-26
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export default defineConfig({
329329
copy: [
330330
{
331331
from: 'src/assets/template.html',
332-
to: 'dist/assets/template.html',
332+
to: 'dist/assets',
333333
},
334334
],
335335
});

packages/egg/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default defineConfig({
44
copy: [
55
{
66
from: 'src/config/favicon.png',
7-
to: 'dist/config/favicon.png',
7+
to: 'dist/config',
88
},
99
],
1010
});

packages/tsconfig/tsdown.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'tsdown';
2+
3+
export default defineConfig({
4+
// export nothing
5+
entry: [],
6+
});

plugins/mock/tsdown.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from 'tsdown';
2+
3+
export default defineConfig({
4+
external: ['mocha'],
5+
});

pnpm-lock.yaml

Lines changed: 20 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ catalog:
200200
terminal-link: ^5.0.0
201201
ts-node: ^10.9.2
202202
tsconfig-paths: ^4.2.0
203-
tsdown: ^0.18.0
203+
tsdown: ^0.18.2
204204
tsx: 4.20.6
205205
type-fest: ^5.0.1
206206
type-is: ^2.0.0
@@ -244,6 +244,7 @@ minimumReleaseAgeExclude:
244244
- oxlint-tsgolint
245245
- oxlint
246246
- oxc-minify
247+
- import-without-cache
247248

248249
overrides:
249250
vite: npm:rolldown-vite@^7.1.13

tools/create-egg/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"exclude": ["src/templates/**/*.ts"]
3+
"exclude": ["src/templates/**/*.ts", "*.config.ts"]
44
}

tools/create-egg/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineConfig({
66
copy: [
77
{
88
from: 'src/templates',
9-
to: 'dist/templates',
9+
to: 'dist',
1010
},
1111
],
1212
});

tools/egg-bin/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
copy: [
1010
{
1111
from: 'scripts',
12-
to: 'dist/scripts',
12+
to: 'dist',
1313
},
1414
],
1515
});

tsdown.config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ export default defineConfig({
44
// Workspace configuration - builds all library packages from root
55
workspace: {
66
include: ['packages/*', 'plugins/*', 'tools/*', 'tegg/core/*', 'tegg/plugin/*', 'tegg/standalone/*'],
7-
// FIXME: auto mode is not working, rolldown was hang and cpu 400% when using auto mode
8-
// include: 'auto',
97
exclude: [
108
'packages/tsconfig', // Config-only package, no src to build
9+
'dist',
1110
],
1211
},
1312

1413
// Shared defaults
15-
unbundle: true,
1614
unused: {
1715
level: 'error',
1816
},
19-
// dts: true,
2017
exports: {
2118
devExports: true,
2219
},
@@ -28,6 +25,7 @@ export default defineConfig({
2825

2926
// Default entry pattern - glob to include all source files
3027
entry: 'src/**/*.ts',
31-
skipNodeModulesBundle: true,
28+
// should set unbundle and external together, avoid bundle @eggjs/* and egg packages
29+
unbundle: true,
3230
external: [/^@eggjs\//, 'egg'],
3331
});

0 commit comments

Comments
 (0)