Skip to content

Commit 0e291d0

Browse files
committed
chore: NODE_ENV replacement for rollup compat
1 parent 480b91c commit 0e291d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dev-packages/rollup-utils/plugins/bundlePlugins.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export function makeBrowserBuildPlugin(isBrowserBuild) {
7171
return replacePlugin(
7272
{
7373
__SENTRY_BROWSER_BUNDLE__: JSON.stringify(!!isBrowserBuild),
74+
// Replace process.env.NODE_ENV for browser bundles (needed for dependencies like Preact)
75+
'process.env.NODE_ENV': JSON.stringify('production'),
7476
},
7577
{
7678
// TODO This will be the default in the next version of the `replace` plugin

0 commit comments

Comments
 (0)