-
Notifications
You must be signed in to change notification settings - Fork 3
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
Custom logical paths #5
Comments
I'll keep this open until a new version is published. |
Just realized that I made a mistake in removing what I called "redundant code" for determining the logical paths. The code that I removed was for adding assets that were added from chunks to the manifest (e.g., Javascript entry point files). I'm creating a new PR to rectify the issue. |
@earksiinni ah, I also noticed that and have reverted that change PR #7. Hopefully I caught you in time! |
Hey @earksiinni if you could provide a sample configuration of the logic paths and what you'd expect the json to look like - that'd be really helpful for me. Thanks! |
The plugin currently doesn't allow for customizing logical paths, which means that each logical path is simply the pathname of the corresponding source file relative to the
sourceAssetsPath
.This behavior can a problem for using generated assets manifests with Rails views. For instance, if your assets are organized in a source directory using Rails' canonical
app/assets/{images, stylesheets, javascripts}
hierarchy and yoursourceAssetsPath
isapp/assets
, your images' logical paths will all be prefixed withimages
(e.g.,app/assets/images/hello.png --> images/hello.png
) . The result is incompatible with commonly used Rails helpers likeimage_tag
, which accept unprefixed logical paths (e.g.,image_tag 'hello.png'
).The text was updated successfully, but these errors were encountered: