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

Support base64 encoded digests to account for rollup 4.x #168

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

aaronjensen
Copy link
Contributor

@aaronjensen aaronjensen commented Nov 22, 2023

Rollup 4 changed its asset digesting to include _ and - (they are now base64 url safe hashes). Without this, assets such as chunk-_OUZQqad.digested.js will not be served by the propshaft server.

I did not change the regex that extracts the digest that Propshaft is expected to generate as that didn't seem appropriate.

This change is necessary for compatibility with Vite 5 and rollup 4 (unless of course there's a better way to do this).

I could not find a way to revert Rollup's hashing technique.

@aaronjensen aaronjensen changed the title Include _ in externally digested regex to account for rollup 4.x Support base64 encoded digests to account for rollup 4.x Dec 4, 2023
@brenogazzola brenogazzola merged commit 6dae310 into rails:main Dec 11, 2023
4 checks passed
@brenogazzola
Copy link
Collaborator

Thanks.

@aaronjensen aaronjensen deleted the rollup-4 branch December 11, 2023 21:42
@aaronjensen
Copy link
Contributor Author

@brenogazzola Is there anything that I can do to help get this ready for a release? We have been unable to run the new version without a monkey patch for a few months. Thank you.

@theodorton
Copy link
Collaborator

@aaronjensen I'm not sure when the next release will be here, but until then you can pull the gem from Github instead of rubygems:

gem 'propshaft', github: 'rails/propshaft'

@aaronjensen
Copy link
Contributor Author

Thanks, @theodorton, I'm aware of that, but we try to avoid git dependencies for various reasons. Is there anything I can do to help make it easier to follow the release process for propshaft?

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

Successfully merging this pull request may close these issues.

3 participants