DynamoMTL / shopify-pipeline

Shopify Pipeline - A modern pipeline for Shopify theme development
MIT License
86 stars 16 forks source link

Images not compiling #94

Closed francisneedham closed 6 years ago

francisneedham commented 6 years ago

Hi, I have assets in src/assets/images && src/assets/fonts but when i no build or serve assets are not compiled in DIST nor uploaded to shopify.

Is there a setting I'm missing?

thanks !

francisneedham commented 6 years ago

solved - but still in my css i cannot use the asset helper to addresso local fontfaces...any suggestions ?

nddery commented 6 years ago

Hey,

Could you please share the piece of code and relevant assets location as this would make it much more easy to find the issue.

Note that you can't use liquid templates inside of your styles. You should to your fonts directly instead and Webpack will pick them up.

Note that it seems we do not parse .css file at the moment, it this is the issue, changing the extension to either .scss or .sass should fix your problem.

francisneedham commented 6 years ago

Hei nddery, thanks for the reply.

i have my fonts into the assets/fonts path and my scss it's inside a personal folder structure compiled via webpack.

Right now i've solved by loading the font assets on the shopify file manager.

nddery commented 6 years ago

Let's say you have the following directory structure:

assets
├── fonts
│   └── font.eot
├── sass
│   ├── index.scss

Inside index.scss you would include your font like so:

@font-face {
  font-family: 'font-name';
  src: url('../fonts/font.eot'); // relative path to your font
  // point to all other formats...
}

During development (yarn serve), your font won't be uploaded to Shopify's servers but served through webpack-dev-server. They will get uploaded to Shopify's server on deploys.

francisneedham commented 6 years ago

fantastic ! everything works ! thanks !