shadow-cljs
shadow-cljs copied to clipboard
Figure out cleaner way to deal with Polyfills
Currently there are 3 separate passes that may emit code that requires polyfills.
- shadow-js which converts npm sources
- classpath-js which converts ESM on the classpath
- goog-js which converts goog.module on the classpath
These need to be coordinated so they don't end up injecting polyfills 3 times. shadow-js sources never make it through :advanced
so they need to stay separate but it might make sense to combine classpath/goog sources.
Currently polyfills are never added dynamically so requiring a file that requires polyfills will fail if they weren't previously part of the build already.