Commit bb6924c
Use noExternal to selectively bundle @fedify/fixture for testing/mod.ts
The previous approach of splitting src/testing/mod.ts into a separate
defineConfig caused the cfworkers build to fail because tsdown flattened
the single-entry output to dist/mod.js instead of dist/testing/mod.js,
breaking the import in src/cfworkers/server.ts.
Instead, keep src/testing/mod.ts and *.test.ts in a single defineConfig
(preserving directory structure in output), mark @fedify/fixture as
external, and use noExternal with a function to selectively bundle it
back in only when imported from src/testing/ files. This way:
- The cfworkers build gets @fedify/fixture inlined in testing/mod.js
- Test files keep @fedify/fixture external, avoiding the
UNLOADABLE_DEPENDENCY error during pnpm pack --recursive
https://github.com/fedify-dev/fedify/actions/runs/23243929108/job/67567201018
Co-authored-by: Amp (https://ampcode.com)
Amp-Thread-ID: https://ampcode.com/threads/T-019d00c0-4bd0-70fe-b81f-82e3738959e9
Co-authored-by: Amp <amp@ampcode.com>1 parent 484b5b4 commit bb6924c
1 file changed
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
| |||
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
0 commit comments