fix(vite): provide global to patch webpacks defaults

This commit is contained in:
Jack Westbrook
2025-03-03 09:51:11 +01:00
parent eb7af07b19
commit 030eb759a9
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import './viteGlobals';
import 'vite/modulepreload-polyfill';
import './core/trustedTypePolicies';
import './jquery';
// TODO: Vite does this differently...
// declare let __webpack_public_path__: string;
@@ -1,3 +1,5 @@
// Vite: hacky approach to making jQuery globally available
import jQuery from 'jquery';
Object.assign(window, { $: jQuery, jQuery });
window.global ||= window;