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

feat: Compress Vite output by default in production #12308

Merged
merged 1 commit into from Nov 10, 2021
Merged

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Nov 8, 2021

As Brotli is disabled by default, you need to enable it to use this feature.
#4740 will enable Brotli by default once server issues are sorted out

Fixes #12055

@Artur- Artur- added the vite Tickets related to vite support label Nov 8, 2021
@Artur- Artur- added this to In progress in Frontend build optimization via automation Nov 8, 2021
@caalador
Copy link
Contributor

caalador commented Nov 9, 2021

Something is failing on the application start now:
applicationStarts ANY_Chrome_ (com vaadin viteapp ProductionBasicsIT)

It's clearly loading, but I don't think that is the expected result for the page.

@Artur- Artur- changed the title feat: Gzip Vite output by default feat: Compress Vite output by default Nov 10, 2021
@Artur- Artur- changed the title feat: Compress Vite output by default feat: Compress Vite output by default in production Nov 10, 2021
@Artur-
Copy link
Member Author

Artur- commented Nov 10, 2021

Updated to use rollup-plugin-brotli which is compatible with Vite. rollup-plugin-gzip compresses the output files in generateBundle and Vite still modifies the files after that plugin phase. rollup-plugin-brotli gathers the file names in generateBundle and compresses them in writeBundle which seemingly work correctly with Vite

@Artur- Artur- requested a review from caalador November 10, 2021 09:27
As Brotli is disabled by default, you need to enable it to use this feature.
#4740 will enable Brotli by default once server issues are sorted out

Fixes #12055
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 22.0.0.beta2 and is also targeting the upcoming stable 22.0.0 version.

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

Successfully merging this pull request may close these issues.

[Vite] Bundle compression for production bundles
3 participants