-
Couldn't load subscription status.
- Fork 69
Closed
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
👋🏻
I recently upgraded to v2 and ran into an issue when bundling your ESM export with my code. It looks look you include process.env.NODE_ENV in your bundle, which isn't automatically replaced by the bundler I use, Vite. This resulted in the browser reporting that process is not defined.
I had to add the following to my Vite config to resolve the issue:
export default defineConfig({
// ...
define: {
'process.env.NODE_ENV': JSON.stringify(env.NODE_ENV || 'development'),
},
// ...
})That's not a huge deal, but I wonder whether there's a way to bundle your ESM export that doesn't require that extra step of defining process.env.NODE_ENV?
Thanks for the consideration!
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.