Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Is there a way to get chunking / code-splitting prefixed with the store's CDN url? #1089

Open
adrianocr opened this issue Jan 23, 2020 · 1 comment

Comments

@adrianocr
Copy link

I got chunking to work across my project and then deployed the theme only to realize that the URL /chunk-name-here.js means nothing to the browser. It needs to be https://cdn.shopify.com/s/files/1/01112/41117/4702/assets/chunk-name-here.js or something like that.

So has anyone gotten this to work? I wouldn't even mind providing the cdn url manually.

@chefjuanpi
Copy link

seems you're manually calling your scripts and not using the build function. Remember, write the js files on /src/scripts, after that during build the scripts will be build and set on assets directory, to call them slack will create the file /snippets/script-tags.liquid file on dist. this file contains the proper way to call files on liquid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants