You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
This repo is currently on low maintenance. See README for details
Problem
I'm not sure if I'm going about this the wrong way, but the template based JS bundling doesn't seem to work on product or collection templates. I tried creating templates/product.product-builder.js template file to be used on templates/product.product-builder.liquid and none of the JS works. Similarly with the collection templates. To make matters worse, neither import templates/product.js or template/collection.js either.
This does work fine for alternative page templates though.
Replication steps
Make matching template files in your src/templates and src/scripts/templates directories, e.g src/template/product.alt.liquid and src/scripts/templates/product.alt.js.
Add a simple script such as a console.log to your new JS file.
Run yarn watch.
Set a product or collection page to use the new alternative template via the admin.
Visit said page and check
The text was updated successfully, but these errors were encountered:
This repo is currently on low maintenance. See README for details
Problem
I'm not sure if I'm going about this the wrong way, but the template based JS bundling doesn't seem to work on product or collection templates. I tried creating
templates/product.product-builder.js
template file to be used ontemplates/product.product-builder.liquid
and none of the JS works. Similarly with the collection templates. To make matters worse, neither importtemplates/product.js
ortemplate/collection.js
either.This does work fine for alternative page templates though.
Replication steps
src/templates
andsrc/scripts/templates
directories, e.gsrc/template/product.alt.liquid
andsrc/scripts/templates/product.alt.js
.yarn watch
.The text was updated successfully, but these errors were encountered: