Closed francisneedham closed 6 years ago
solved - but still in my css i cannot use the asset helper to addresso local fontfaces...any suggestions ?
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.
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.
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.
fantastic ! everything works ! thanks !
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 !