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
I'm exploring using Closure Compiler with node_modules and have run into a couple of blocking issues:
Moocher dropping. All CJS modules are being considered moochers because they don't "provide" anything. I need moocher dropping in my codebase to avoid pulling in tons of unused files for compilation.
node_module path resolution. I'm happy to write my paths explicitly like require("react-bootstrap/lib/Action.js") but where the module I'm requiring itself requires e.g. "react" rather than "react/main.js", it's an error. For this I'd like to supply my own loader which implements node_modules rules and package json awareness.
As it stands I think I can only realistically use CJS requires (or ES6 imports) when importing my own code rather than complex pre-existing libraries.
The text was updated successfully, but these errors were encountered:
Moocher dropping. All CJS modules are being considered moochers because they don't "provide" anything. I need moocher dropping in my codebase to avoid pulling in tons of unused files for compilation.
Not sure why you see this - this definitely isn't occurring in my code bases. Make sure you use the --process_common_js_modules flag.
As it stands I think I can only realistically use CJS requires (or ES6 imports) when importing my own code rather than complex pre-existing libraries.
I'm exploring using Closure Compiler with node_modules and have run into a couple of blocking issues:
require("react-bootstrap/lib/Action.js")
but where the module I'm requiring itself requires e.g. "react" rather than "react/main.js", it's an error. For this I'd like to supply my own loader which implements node_modules rules and package json awareness.As it stands I think I can only realistically use CJS requires (or ES6 imports) when importing my own code rather than complex pre-existing libraries.
The text was updated successfully, but these errors were encountered: