Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
WMR-229 node builtins #233
Conversation
|
Looks good! Reading this I am wondering: would it be more helpful to warn during development but error when building for production? A bunch of the plugins accept a |
WMR does not polyfill node core modules to prompt users to double-check their use in the browser and reduce bundle size. This is a small change to add a thrown error message when this occurs in production, in development a warning is given instead. this informs the user which dependency requires the module and where in their code.
Ensure that loading a core module will throw the error we expect. Uses http as an example. Ensure outside of production we get a warning instead and a stubbed function.
2d786f0
to
c8b7dd4
Cheers! |


First pass at adding a helpful error message when attempting to use Node built-ins.
Let me know if any changes need making!