archetype-themes / plugin-theme-component

A Shopify CLI plugin for building theme components.
MIT License
9 stars 4 forks source link

Reference to missing Component.css file injected into layout/theme.liquid upon build #333

Closed bertiful closed 8 months ago

bertiful commented 8 months ago

Problem Encountered When running shopify theme component dev and the files are built, the following code gets injected into the dev theme's layout/theme.liquid file:

<link type="text/css" href="{{ 'Components.css' | asset_url }}" rel="stylesheet">

The asset for this reference doesn't exist. The proper file is assets/component.css.liquid which gets properly built. This reference shouldn't be injected as this is leading to a 404.

Tested with @fleveillee's and we encountered the same issue on both our machines.

montalvomiguelo commented 8 months ago

The problem is that the filename uses the collection's name without converting it to param-case.