shadow-cljs icon indicating copy to clipboard operation
shadow-cljs copied to clipboard

Figure out cleaner way to deal with Polyfills

Open thheller opened this issue 4 years ago • 0 comments

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.

thheller avatar May 12 '20 17:05 thheller