Commit 7922b84
fix(landing): expose Prism globally before loading prism-sql
prismjs/components/prism-sql references the global Prism at module top level,
which is undefined under ESM. The manualChunks rule also stuffed core and the
language file into one chunk, so even a dynamic import would still trigger
prism-sql synchronously when vendor-prism evaluated. Import Prism as a value,
assign window.Prism, then dynamic-import prism-sql; split components out of
vendor-prism so the language chunk is only evaluated after the global is set.
This unblocks the inline module on Pages, where the ReferenceError was killing
the hero ER graph and every scroll-reveal animation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 981feb2 commit 7922b84
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | | - | |
1958 | | - | |
| 1957 | + | |
1959 | 1958 | | |
1960 | 1959 | | |
1961 | 1960 | | |
1962 | 1961 | | |
1963 | 1962 | | |
1964 | 1963 | | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
1965 | 1969 | | |
1966 | 1970 | | |
1967 | 1971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
0 commit comments