Commit 1fb7d59
authored
chore: harden vite externals to prevent CJS-in-ESM bundling (#4946)
* chore: harden vite externals to prevent CJS-in-ESM bundling
Apply the same external shape used by eds-tokens-sync (#4883) to the
remaining vite configs so a transitive dep importing node: built-ins
(or bare-name built-ins) can't be silently bundled into ESM output:
- eds-tokens-build: replace explicit node:* with /^node:/ regex; add
bare-name fs, os, crypto, process
- eds-tokens/vite.generate-variables: add /^node:/ regex and process
- eds-color-palette-generator: replace explicit node:* with /^node:/
regex; add bare-name fs, path, os, crypto, process
Builds verified: dist/ output is byte-identical against pre-change
baseline for all three packages.
Closes #4886
* chore: align eds-tokens-sync externals with the four-config canonical shape
Add 'crypto' and 'process' to the bare-name list so all four vite configs
share the same Node built-in external shape, addressing the consistency
nit raised in PR #4946 review.
Dist output is byte-identical to pre-change baseline.1 parent e9e7bc1 commit 1fb7d59
4 files changed
Lines changed: 23 additions & 9 deletions
File tree
- apps/eds-color-palette-generator
- packages
- eds-tokens-build
- eds-tokens-sync
- eds-tokens
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
0 commit comments