How would I include polyfills only in "nomodule" differential builds? #10060
Unanswered
JulianSchoenbaechler
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to include core-js polyfills only into a referenced nomodule script tag, when I have a HTML file as main source. I have something like the following
package.json
.The
index.html
references a JS file like soThis creates two JS outputs (
type="module"
andnomodule
). So far so good. Now I'd like to have more control on what gets included into the legacy nomodule build. For example, I want to include some polyfills only into the nomodule parsed output. If I for example addto the referenced
index.js
, the polyfills are transpiled into all outputted JS bundles.As far as I can see there is no way to control the differential builds whatsoever. Am I correct in this assumption?
If so, the only way to create legacy bundles based on the nomodule attribute, is to declare separate targets for each source file and manually add the built scripts to a main HTML file...
Beta Was this translation helpful? Give feedback.
All reactions