Commit 4be6e5e
fix(platform): stop tsconfig paths from shadowing the @platform alias
The `@platform/*` entry in `apps/site/tsconfig.json` was being picked up
by `tsconfig-paths-webpack-plugin` before webpack's `resolve.alias`,
which caused the Cloudflare worker bundle to include the default
platform's MDX config (`wasm: true`) instead of cloudflare's
(`wasm: false`). At runtime the worker hit
`WebAssembly.instantiate(): Wasm code generation disallowed by embedder`.
Drop the tsconfig path, declare a wildcard ambient module
`@platform/*` for `lint:types`, and let webpack's alias be the sole
source of truth for `@platform/*` resolution. The alias can now be the
plain package specifier, so the `createRequire` + `dirname` workaround
goes away too.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent b6fb2df commit 4be6e5e
3 files changed
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
| |||
0 commit comments