-
Notifications
You must be signed in to change notification settings - Fork 93
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
Proposal for capturing digested assets path #99
Comments
Yes, I like this. cc @brenogazzola |
Sure! @rainerborene Could you also post some sample code of this in action? From what I'm seeing, the This seems to me something that you’d pass “logo.png”, which is the file the builder wanted, and propshaft would gind “logo-DIGEST.png”, which is what propshaft generated. |
@brenogazzola Not sure if I follow. By |
Sorry, let me be more specific (we can try zoom if it’s still confusing) By pattern = /\A#{filename}-([0-9a-zA-Z]{7,128})\.digested\.#{extname}\z/ I expected it to be: pattern = /\A#{filename}-([0-9a-zA-Z]{7,128})\.#{extname}\z/ From what I understood of your PR and use case, you have an image file referenced in your JS files as something like |
Same time zone as yours. Plz ping me at rainerborene at gmail dot com.
Exact the opposite! Take a look at the module.exports = {
output: {
filename: "[name].js",
sourceMapFilename: "[file].map",
chunkFilename: "[name]-[contenthash].digested.js",
assetModuleFilename: "asset-[contenthash].digested[ext]",
path: path.resolve(__dirname, "app/assets/builds"),
}
} |
Hey there! I would like to share some bits of code that we implemented at our company and it could be merged into the official
propshaft
gem. Right now there is no way to reference digested assets from webpack, rollup.js or any other build system. On the other side,propshaft
already does recognize digested assets with.digested.
pattern on the filename. The motivation for this feature is to be able to usepreload_link_tag
or reference any kind of asset generated from external builders. No more talk, here is the code.Let me know if this sounds good so I can start working on a pull request. :D
The text was updated successfully, but these errors were encountered: