Skip to content

Commit

Permalink
Remove the substitution of import.meta.env that was ment for service …
Browse files Browse the repository at this point in the history
…workers
  • Loading branch information
garronej committed Apr 16, 2024
1 parent d7dcd6a commit 1c1e01d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export function viteEnvs(params?: {
/import\.meta\.env(?:\.([A-Za-z0-9$_]+)|\["([^"]+)"\]|(.?))/g,
(match, p1, p2, p3) => {
const out = (() => {
const globalRef = `(typeof window === "undefined" ? self : window).${nameOfTheGlobal}`;
const globalRef = `window.${nameOfTheGlobal}`;

if (p3 !== undefined) {
return `${globalRef}${p3}`;
Expand Down

0 comments on commit 1c1e01d

Please sign in to comment.