Commit 46f93de
committed
fix(transform,react): remove overlay auto-init from Vite preamble
The preamble's overlay import via /node_modules/ path creates a
separate module instance from Vite's pre-bundled version, breaking
RuntimeManager singleton sharing with the React adapter. This caused
componentName to be null in e2e tests.
Fix: only set window globals in the preamble. Move overlay auto-init
to the react-init virtual module (which uses bare specifiers resolved
through Vite's pre-bundling pipeline, sharing singletons correctly).
transformIndexHtml continues to handle overlay init for SPA setups.1 parent 72fad53 commit 46f93de
File tree
2 files changed
+18
-15
lines changed- packages
- domscribe-react/src/vite
- domscribe-transform/src/plugins/vite
2 files changed
+18
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
89 | 83 | | |
90 | 84 | | |
91 | 85 | | |
| |||
0 commit comments