ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.41k stars 777 forks source link

Relative components files paths #1742

Closed vpaulo closed 2 years ago

vpaulo commented 4 years ago

Stencil version:

 @stencil/core@<1.1.5>

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:

I am pushing my components build folder to an AWS S3 bucket where i have different versions of the builds to be served through cloudfront. example: https://[CLOUNDFRONT]/80/dist/mycomponents/mycomponents.esm.js https://[CLOUNDFRONT]/79/dist/mycomponents/mycomponents.esm.js ... Issue that i am having is that when i update the version of the scripts that i want to be loaded in my websites, for example i want to update the script from version 79 to 80, the load of the component scripts sometimes tries to load the script from the previous version.

Expected behavior:

components files should load from the correct version

Steps to reproduce:

changed the version to 80 ''

and then when some clients load the pages the script tries to load a component script ./p-4pjpnuaw.entry.js and it fails because it's trying to get this file for the version 79 where this does not exist, only in version 80 this file exists.

logs: [CLOUNDFRONT]/79/dist/mycomponents/p-4pjpnuaw.entry.js:1 Failed to load resource: the server responded with a status of 404 () p-48b36ce1.js:1 TypeError: Failed to fetch dynamically imported module: https://[CLOUNDFRONT]/79/dist/mycomponents/p-4pjpnuaw.entry.js

Related code: could this be because of getAbsoluteBuildDir in stencil/src/compiler/html/utils.ts function that gets only the relative paths?

// insert any relevant code here

Other information:

splitinfinities commented 2 years ago

Hey there, thank you for the patience getting back to you. The new team is getting started and we're working through the backlog now.

We do not support Stencil versions less than v2, and you seem to be using an older version of Stencil. If you can upgrade to the latest version and let me know if this issue still exists, I would appreciate it.

Let me know if you need anything else!

ionitron-bot[bot] commented 2 years ago

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!