Skip to content

Commit eca64b5

Browse files
committed
fix(browser): Remove import.meta.env check to avoid CJS syntax errors
The import.meta syntax causes 'Cannot use import.meta outside a module' errors in CommonJS builds. Since the makeStripEsmPlugin that was supposed to strip this code doesn't exist, removing the import.meta.env check entirely. The SDK will still auto-enable Spotlight via: - process.env: Works with Webpack, Next.js, CRA, Vite (with define config) - globalThis: Works with Turbopack and other bundlers that inject at runtime Also removed the related Vite spotlight-env tests since they were testing the now-removed import.meta.env functionality.
1 parent 351046b commit eca64b5

File tree

6 files changed

+6
-428
lines changed

6 files changed

+6
-428
lines changed

dev-packages/e2e-tests/test-applications/SPOTLIGHT_ENV_TESTS.md

Lines changed: 0 additions & 199 deletions
This file was deleted.

dev-packages/e2e-tests/test-applications/browser-webworker-vite/spotlight-env-test.html

Lines changed: 0 additions & 38 deletions
This file was deleted.

dev-packages/e2e-tests/test-applications/browser-webworker-vite/src/spotlight-env-test.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)