slate icon indicating copy to clipboard operation
slate copied to clipboard

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

Open adrianocr opened this issue 5 years ago • 1 comments

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.

adrianocr avatar Jan 23 '20 00:01 adrianocr

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

chefjuanpi avatar Oct 20 '20 07:10 chefjuanpi