Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Scripts will not load for alternate layouts #1006

Open qw-in opened 5 years ago

qw-in commented 5 years ago

This repo is currently on low maintenance. See README for details

Problem

Scripts will not load for alternate layouts Succinct outline of the problem or request.

Replication steps

  1. Create a new layout (theme.example.liquid)
  2. Create a new js layout file (theme.example.js)
  3. Run yarn start -> Script will be loaded in theme.liquid instead How to replicate the problem. Screenshots or video?

More Information

It is because of how the script-tags template generates the layout checks: https://github.com/Shopify/slate/blob/97408494ad07e38b51639d0c31329a6bafb753e6/packages/slate-tools/tools/webpack/script-tags.html#L8-L14

It should instead use the method lower in the same file:

https://github.com/Shopify/slate/blob/97408494ad07e38b51639d0c31329a6bafb753e6/packages/slate-tools/tools/webpack/script-tags.html#L48-L52

Any additional information which might be helpful.