Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mincer assetPath helper ignore mount-path flag #282

Open
zanonnicola opened this issue Aug 31, 2018 · 0 comments
Open

Mincer assetPath helper ignore mount-path flag #282

zanonnicola opened this issue Aug 31, 2018 · 0 comments

Comments

@zanonnicola
Copy link
Contributor

Hi team,

I was using <%= asset_path('resource') %> in my css file to retrieve some resources (web fonts in my case) and I noticed that after running shunter-build script all my webfonts where being served from the root www.domain.com/public/resources/web-font.woff instead of from the path declared in the mount-path option resulting in a 404.

mount-path was introduced here: #262

DustJS asset path helper (<script src="{@assetPath src="main.js"/}"></script>) works as expected.

Expected Behaviour

if I run:
NODE_ENV=production node app.js -l -c 1 --mount-path=/mypath

I'm expecting all my assets generated by Shunter to be served from: /mypath/public/resources/

Current Behavior

If you reference an assets inside a CSS file using this helper: <%= asset_path('resource') %> it will ignore the mount path option --mount-path=/mypath

Context (Environment)

This will only happens if you use that flag and reference a resource via Mincer asset_path helper.

Hope it is clear enough!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants