`ouptutTarget.externalRuntime: true` causes breaking behaviour
Stencil version:
@stencil/[email protected]
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
When externalRuntime: false, changes in stencil.config.ts don't show in the built code. Notably, this means enabling extras such as shadowDomShim won't affect the build.
Our production build uses extras.shadowDomShim for browser compatibility, so without this being enabled in the built code, our site breaks on older devices.
Expected behavior:
Changes in stencil.config.ts should update the build regardless of whether Stencil's framework code is inlined.
Steps to reproduce:
Create builds with externalRuntime set to true and false, and observe how Stencil's internal APP_DATA is loaded differently.
Related code: Unicorn, the library affected
Other information:
In most dist targets (and when externalRuntime: false) Stencil bakes in the APP_DATA using values from stencil.config.ts. This means setting extras.shadowDomShim in the config will change the built APP_DATA to enable the shim.
However, when externalRuntime: true (default for dist-custom-elements,) APP_DATA is loaded from within Stencil itself, therefore the default APP_DATA is used and changes in stencil.config.ts aren't loaded.
Hi @AsherFoster, sorry that it took so long for anyone from the Stencil team to respond to this issue. Would you possibly be able to provide a simple reproduction case? An easy way to do so is often to start with the Stencil component start:
npm init stencil component
and then modify as needed to showcase the issue. Reproduction cases really help us to diagnose and then fix issues, determine which versions are affected, etc.
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
Thank you for using Stencil!