Commit a6b8444
committed
refactor(build): auto-detect external dependencies from package.json
Change esbuild configuration to dynamically read runtime dependencies
from package.json instead of manually listing them.
Changes:
- Read package.json at build time to get dependencies object
- Use Object.keys(dependencies) to populate external array
- Remove hardcoded list of external dependencies
Benefits:
- Automatically keeps external dependencies in sync with package.json
- Prevents mistakes where dependencies are added but not marked external
- Clearer intent: all dependencies are external, devDependencies bundled
- Eliminates manual maintenance of external array
Verification:
- form-data correctly marked as external (not bundled inline)
- Bundle only contains require("form-data") statement
- All bundle validation tests pass1 parent 0911748 commit a6b8444
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 233 | + | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
0 commit comments