Replies: 2 comments
-
Updated above with a note that...
|
Beta Was this translation helpful? Give feedback.
-
This should not happen. Are you using the latest version? If so, would you create a minimal reproduction?
Assuming you are outputting the bundle as ESM, adding a query param won't work well with ESM. Is it possible to disable that behavior? If it is not possbile, I guess you need to workaround it by serving a proxy module that contains |
Beta Was this translation helpful? Give feedback.
-
Hey there, I'm looking for help to resolve some code-splitting issues in a unique deployment setup.
Background and setup
<component :is=“…” />
for each block type.So far, this is all fairly straightforward when I have complete control over the deployment.
Enter Shopify development
But this is where it gets tricky.
The Vue application is deployed as a Shopify theme extension block for a Shopify app. The main thing that’s relevant here is that Shopify handles the deployment and sets some annoying constraints.
/assets/
folder (I have this part working withrollupOptions
in the vite config)The domain for the HTML is
[some-store].myshopify.com
; but the assets are put on a CDNcdn.shopify.com/extensions/[theme_extension_uuid]/assets/*
(and thetheme_extension_uuid
is not known at build time).Also, the asset URL includes a cache buster param when injected in the html, like this…
cdn.shopify.com/extensions/[theme_extension_uuid]/assets/index.js?v=1726188069
Now when loading the page... things get weird:
Worse, for CSS chunks
I get a mess of console errors for each 404, and a lot of red in the network tab.
How to configure for this case?
Is this a vite or vite plugin vue concern, or something I should solve for with rollup options? I’m not sure how to move forward.
Beta Was this translation helpful? Give feedback.
All reactions