Skip to content

Commit

Permalink
fix: Remove WXT global to remove unused modules from production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Nov 16, 2023
1 parent 64d61eb commit 3da3e07
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/virtual/background-entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import definition from 'virtual:user-background';
import { setupWebSocket } from '../client/utils/setup-web-socket';
import { logger } from '../client/utils/logger';
import browser from 'webextension-polyfill';
import { storage } from '~/storage';
import { keepServiceWorkerAlive } from '../client/utils/keep-service-worker-alive';
import { reloadContentScript } from '../client/utils/reload-content-scripts';

Expand Down Expand Up @@ -30,14 +29,6 @@ if (__COMMAND__ === 'serve') {
}

try {
// Add utils to global scope so they're accessible from the console during development
if (import.meta.env.DEV) {
// @ts-expect-error: Untyped global
globalThis.wxt = {
storage,
};
}

const res = definition.main();
// @ts-expect-error: res shouldn't be a promise, but we're checking it anyways
if (res instanceof Promise) {
Expand Down

0 comments on commit 3da3e07

Please sign in to comment.