You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building an app with observable-membrane as a dependency throws because process.env.NODE_ENV is not defined. In order to fix this, developer has to add rollup-plugin-replace or another tool that will strip out process.env.NODE_ENV. We should provide a default value so that installing this package doesn't immediately break builds.
Steps to Reproduce
Start new app with rollup
Install observable-membrane
Build
Expected Results
No Error 🎉
Actual Results
Uncaught ReferenceError: process is not defined 😿
The text was updated successfully, but these errors were encountered:
IMO process.env.NODE_ENV should stay in the generated esm modules. Providing a default value means that the bundle can't do dead-code elimination.
Popular libraries like React, Redux or Vue or ship process.env.NODE_ENV in their generated lib and rely on bundler to inject the right values. While rollup requires a plugin, it's done by default by Webpack and browserify. The only format where it makes sense to strip it is for UMD.
Description
Building an app with
observable-membrane
as a dependency throws becauseprocess.env.NODE_ENV
is not defined. In order to fix this, developer has to addrollup-plugin-replace
or another tool that will strip outprocess.env.NODE_ENV
. We should provide a default value so that installing this package doesn't immediately break builds.Steps to Reproduce
observable-membrane
Expected Results
No Error 🎉
Actual Results
Uncaught ReferenceError: process is not defined
😿The text was updated successfully, but these errors were encountered: