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
Tthis is currently not supported, which means a Node.JS import statement is currently left behind in web-targeted output:
import{platform as e}from"process";
🤔 Expected Behavior
The bundler should perform static analysis on process.platform properties and resolve expressions at compile-time - similar to how process.env gets resolved, perhaps even reusing the same code.
🔦 Context
#7904 was recently resolved and received an enhancement to better support ansi-colors, but didn't get all the way there.
This should replace process.platform with undefined in browsers
It probably should statically resolve process.platform and compile it away entirely, if possible - same way process.env expressions get evaluated at compile-time, pruning conditional branches that can't/shouldn't be executed in the browser.
🙋 feature request
I'm trying to bundle
ansi-colors
for the web, which referencesprocess.platform
.Tthis is currently not supported, which means a Node.JS
import
statement is currently left behind in web-targeted output:🤔 Expected Behavior
The bundler should perform static analysis on
process.platform
properties and resolve expressions at compile-time - similar to howprocess.env
gets resolved, perhaps even reusing the same code.🔦 Context
#7904 was recently resolved and received an enhancement to better support
ansi-colors
, but didn't get all the way there.💻 Example
See this project for reference.
The text was updated successfully, but these errors were encountered: