Log1x / blade-svg-sage

A simple package to add support for Blade SVG by Adam Wathan to Roots Sage.
MIT License
72 stars 13 forks source link

`yarn run build:production`: Hash issues #5

Closed strarsis closed 7 years ago

strarsis commented 7 years ago

When running yarn run build:production the resulting files in dist got hashes in their file names. @icon isn't able to load them anymore because it cannot find the file by its normal file name (without hash).

Log1x commented 7 years ago

Added a parse_asset_path helper you can use when defining an asset path to hopefully grab the absolute path of the image from your manifest.

strarsis commented 7 years ago

@Log1x: Thank you for this addition! It would be great if there would be some extra documentation about how to add parse_asset_path(...) for making it work with build:production. Though I also have the same issue with @asset, see this recent discourse on roots.io: https://discourse.roots.io/t/asset-hashes/10261/1

purplefeel commented 1 year ago

Is there a documentation for parse_asset_path() helper how to use it? Thanks!

Log1x commented 1 year ago

This would've been very legacy and doesn't exist anymore.

If you're using Sage 10, you will want to use https://github.com/Log1x/sage-svg or https://blade-ui-kit.com/blade-icons

purplefeel commented 1 year ago

Oh right, yeah, I've been using sage-svg. I had a similar production issue which I thought was related to hash thing ( and this thread popped up and I didn't double check the library name ) but it turned out my issue was caused by filename case mismatching. Production build hash didn't really matter as it rendered SVGs inline. Thank you for your reply and reminding!