-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
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.
mseddon and kuus