Skip to content

Commit c25c53a

Browse files
committed
Prepend Vue feature flags to JS bundle output
Adds global Vue feature flags at the top of the generated JavaScript code to suppress warnings when using CDN-loaded Vue. This ensures consistent behavior and reduces unnecessary console output.
1 parent c126483 commit c25c53a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/vs/workbench/contrib/roopik/electron-main/build/esbuildTransformer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,14 @@ export class ESBuildTransformer {
649649
}
650650
}
651651

652+
// Prepend Vue feature flags (suppress warnings for CDN-loaded Vue)
653+
const vueGlobals = `// Vue feature flags (for CDN-loaded Vue)
654+
globalThis.__VUE_OPTIONS_API__ = true;
655+
globalThis.__VUE_PROD_DEVTOOLS__ = false;
656+
globalThis.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
657+
`;
658+
jsCode = vueGlobals + jsCode;
659+
652660
// If CSS was generated, inject it into the JS bundle
653661
if (cssCode) {
654662
const escapedCss = JSON.stringify(cssCode);

0 commit comments

Comments
 (0)