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

Restore asset compress after Rails 6 upgrade #1843

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

EGiataganas
Copy link
Contributor

What

Changes to production.rb to restore asset compression to previous output.

Why

  • The upgrade to Rails 6 disabled JS compression because it now defaults to using webpack.

Visual differences

None.

@bevanloon bevanloon temporarily deployed to government-f-fix-asset--vf0d4e August 25, 2020 10:29 Inactive
pixeltrix
pixeltrix previously approved these changes Aug 25, 2020
@pixeltrix pixeltrix dismissed their stale review August 25, 2020 10:50

Change is in the wrong file

config/application.rb Outdated Show resolved Hide resolved
Because the default for Rails 6 is to use webpack for JS the Sprockets
js_compressor option is not set in the generated production.rb
environment file. This leads to bloated file sizes in production so
re-enable compression by explicitly setting it
@EGiataganas EGiataganas force-pushed the fix-asset-compression branch from 8790799 to 2e1ca34 Compare August 25, 2020 10:52
@bevanloon bevanloon temporarily deployed to government-f-fix-asset--vf0d4e August 25, 2020 10:52 Inactive
@MuriloDalRi MuriloDalRi merged commit 95fa95a into master Sep 2, 2020
@MuriloDalRi MuriloDalRi deleted the fix-asset-compression branch September 2, 2020 08:24
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.

4 participants