-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: stencil build
command generates the folder dist\esm\polyfills\
folder even if buildEs5=false in config
#5416
Comments
Hey @alvarocjunq 👋 Thanks for the issue! It appears the logic that we currently use to generate these files doesn't take any Stencil configuration values into account, which is why you likely see these files generated as a part of the build. I'm going to label this for someone to take a look into some ways we can fix this. |
Thank you to take into account @rwaskiewicz 😄 |
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
#5725) Prior to this change Stencil will copy polyfills to the `dist` output target whether or not the user has indicated they'll be necessary. The polyfills comprise two things: copying the polyfills themselves into the 'loader' path, and adding code to the lazy-loader entry points which loads those polyfills. Instead of just assuming that the user wants this, we now gate this behavior on whether `buildEs5` is set on the Stencil configuration. fixes #5416 STENCIL-1288
The fix for this issue has been released as a part of today's Stencil v4.18.1 release! |
Prerequisites
Stencil Version
4.12.4
Current Behavior
Even if set the flag
buildEs5: false
instencil.config.ts
the output in dist is generating the es5 files:In my company they are finding vulnerabilities in this files that we don't even use 😢
Expected Behavior
It is possible not to generate these files that are not being used by the component?
System Info
Steps to Reproduce
stencil.config.ts
with the flagbuildEs5: false
npm run build
Code Reproduction URL
https://github.com/alvarocjunq/stencil-es5-polyfill-issue
Additional Information
No response
The text was updated successfully, but these errors were encountered: