Skip to content

Commit 141e6cb

Browse files
chore(protocol-designer): Add tslib back into Vite config to fix whitescreen (#20229)
PD was whitescreening with this console error: ``` 13:11:30.678 index.js:3 Uncaught TypeError: Cannot destructure property '__extends' of 'import_tslib.default' as it is undefined. at index.js:3:5 (anonymous) @ index.js:3 13:13:18.067 (index):1 Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. ``` I do not understand any of this, but from `git bisect`ing, the apparent cause is #20207's removal of `include: ['tslib']` and/or `dedupe: ['tslib']` from our Vite config. None of our other projects need this, so it's likely that there's some PD-specific weirdness going on here—possibly some misconfiguration somewhere else—but I haven't looked into it. This PR reverts the change as a quick fix to unblock development.
1 parent f53562b commit 141e6cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocol-designer/vite.config.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ export default defineConfig(async (): Promise<UserConfig> => {
113113
esbuildOptions: {
114114
target: 'es2020',
115115
},
116+
// For unknown reasons, PD whitescreens on launch unless we have this.
117+
include: ['tslib'],
116118
},
117119
css: {
118120
postcss: {
@@ -143,6 +145,8 @@ export default defineConfig(async (): Promise<UserConfig> => {
143145
},
144146
resolve: {
145147
conditions: ['browser'],
148+
// For unknown reasons, PD whitescreens on launch unless we have this.
149+
dedupe: ['tslib'],
146150
alias: {
147151
// todo(mm, 2025-10-27): These cross-project aliases cause trouble like
148152
// files being processed with the wrong config (the config from the

0 commit comments

Comments
 (0)