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

Remove manual chunks and disable inlining assets #351

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

paazmaya
Copy link
Contributor

Without manual chunks

vite v4.4.9 building for production...
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (10:12) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (175:21) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 12520 modules transformed.
build/index.html                                                0.61 kB │ gzip:   0.36 kB
build/assets/roboto-vietnamese-700-normal-d986b503.woff         4.73 kB
build/assets/roboto-vietnamese-500-normal-7899e6a5.woff         4.73 kB
build/assets/roboto-vietnamese-400-normal-d2390f1a.woff         4.75 kB
build/assets/roboto-vietnamese-300-normal-7747ef64.woff         4.77 kB
build/assets/roboto-vietnamese-300-normal-51f3f418.woff2        5.47 kB
build/assets/roboto-vietnamese-700-normal-4ec57f2a.woff2        5.55 kB
build/assets/roboto-vietnamese-400-normal-77b24796.woff2        5.56 kB
build/assets/roboto-vietnamese-500-normal-0948409a.woff2        5.60 kB
build/assets/roboto-greek-700-normal-3f1a5012.woff              6.30 kB
build/assets/roboto-greek-500-normal-93181eb7.woff              6.32 kB
build/assets/roboto-greek-400-normal-076b9dc1.woff              6.35 kB
build/assets/roboto-greek-300-normal-6bb1ef10.woff              6.44 kB
build/assets/roboto-greek-700-normal-1c9cc76f.woff2             6.94 kB
build/assets/roboto-greek-500-normal-713780d8.woff2             7.02 kB
build/assets/roboto-greek-400-normal-daf51ab5.woff2             7.11 kB
build/assets/roboto-greek-300-normal-455c2c1a.woff2             7.12 kB
build/assets/roboto-cyrillic-400-normal-adba67d2.woff           8.39 kB
build/assets/roboto-cyrillic-300-normal-c07952fe.woff           8.43 kB
build/assets/roboto-cyrillic-700-normal-6f82c5e2.woff           8.66 kB
build/assets/roboto-cyrillic-500-normal-4bc088e9.woff           8.70 kB
build/assets/roboto-cyrillic-300-normal-47aa3bfa.woff2          9.58 kB
build/assets/roboto-cyrillic-400-normal-495d38d4.woff2          9.63 kB
build/assets/roboto-cyrillic-700-normal-6a84eeee.woff2          9.64 kB
build/assets/roboto-cyrillic-500-normal-3728fbdd.woff2          9.84 kB
build/assets/roboto-latin-ext-700-normal-3d1cbacf.woff         10.17 kB
build/assets/roboto-latin-ext-500-normal-a303676a.woff         10.18 kB
build/assets/roboto-latin-ext-400-normal-c2b94086.woff         10.21 kB
build/assets/roboto-latin-ext-300-normal-35da7ccd.woff         10.36 kB
build/assets/roboto-latin-ext-300-normal-b076e863.woff2        11.80 kB
build/assets/roboto-latin-ext-500-normal-7f1c829b.woff2        11.80 kB
build/assets/roboto-latin-ext-700-normal-fc66f942.woff2        11.82 kB
build/assets/roboto-latin-ext-400-normal-3c23eb02.woff2        11.87 kB
build/assets/roboto-cyrillic-ext-700-normal-8ea7934f.woff      13.43 kB
build/assets/roboto-cyrillic-ext-500-normal-57138788.woff      13.45 kB
build/assets/roboto-cyrillic-ext-400-normal-0a32035a.woff      13.47 kB
build/assets/roboto-cyrillic-ext-300-normal-5e06c977.woff      13.55 kB
build/assets/roboto-latin-400-normal-a9fdbefa.woff             14.38 kB
build/assets/roboto-latin-700-normal-d89bc0fc.woff             14.42 kB
build/assets/roboto-latin-500-normal-3ac31048.woff             14.42 kB
build/assets/roboto-latin-300-normal-ddb5c61d.woff             14.59 kB
build/assets/roboto-cyrillic-ext-700-normal-3c505383.woff2     14.68 kB
build/assets/roboto-cyrillic-ext-500-normal-aeed0e51.woff2     14.97 kB
build/assets/roboto-cyrillic-ext-300-normal-435e4b7f.woff2     15.00 kB
build/assets/roboto-cyrillic-ext-400-normal-b7ef2cd1.woff2     15.34 kB
build/assets/roboto-latin-300-normal-f7591131.woff2            15.74 kB
build/assets/roboto-latin-400-normal-f6734f81.woff2            15.74 kB
build/assets/no-image-8357d694.png                             15.80 kB
build/assets/roboto-latin-700-normal-f5aebdfe.woff2            15.86 kB
build/assets/roboto-latin-500-normal-b0195382.woff2            15.92 kB
build/assets/logo-b4500173.png                                 74.85 kB
build/assets/style-b575b3e9.css                                23.48 kB │ gzip:  10.39 kB
build/assets/index-cd40e458.js                              1,830.49 kB │ gzip: 499.02 kB │ map: 6,326.37 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 23.21s

With manual chunks and trying to create under half mega chunks

vite v4.4.9 building for production...
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (10:12) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (175:21) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 12520 modules transformed.
build/index.html                                              1.15 kB │ gzip:   0.46 kB
build/assets/roboto-vietnamese-500-normal-7899e6a5.woff       4.73 kB
build/assets/roboto-vietnamese-700-normal-d986b503.woff       4.73 kB
build/assets/roboto-vietnamese-400-normal-d2390f1a.woff       4.75 kB
build/assets/roboto-vietnamese-300-normal-7747ef64.woff       4.77 kB
build/assets/roboto-vietnamese-300-normal-51f3f418.woff2      5.47 kB
build/assets/roboto-vietnamese-700-normal-4ec57f2a.woff2      5.55 kB
build/assets/roboto-vietnamese-400-normal-77b24796.woff2      5.56 kB
build/assets/roboto-vietnamese-500-normal-0948409a.woff2      5.60 kB
build/assets/roboto-greek-700-normal-3f1a5012.woff            6.30 kB
build/assets/roboto-greek-500-normal-93181eb7.woff            6.32 kB
build/assets/roboto-greek-400-normal-076b9dc1.woff            6.35 kB
build/assets/roboto-greek-300-normal-6bb1ef10.woff            6.44 kB
build/assets/roboto-greek-700-normal-1c9cc76f.woff2           6.94 kB
build/assets/roboto-greek-500-normal-713780d8.woff2           7.02 kB
build/assets/roboto-greek-400-normal-daf51ab5.woff2           7.11 kB
build/assets/roboto-greek-300-normal-455c2c1a.woff2           7.12 kB
build/assets/roboto-cyrillic-400-normal-adba67d2.woff         8.39 kB
build/assets/roboto-cyrillic-300-normal-c07952fe.woff         8.43 kB
build/assets/roboto-cyrillic-700-normal-6f82c5e2.woff         8.66 kB
build/assets/roboto-cyrillic-500-normal-4bc088e9.woff         8.70 kB
build/assets/roboto-cyrillic-300-normal-47aa3bfa.woff2        9.58 kB
build/assets/roboto-cyrillic-400-normal-495d38d4.woff2        9.63 kB
build/assets/roboto-cyrillic-700-normal-6a84eeee.woff2        9.64 kB
build/assets/roboto-cyrillic-500-normal-3728fbdd.woff2        9.84 kB
build/assets/roboto-latin-ext-700-normal-3d1cbacf.woff       10.17 kB
build/assets/roboto-latin-ext-500-normal-a303676a.woff       10.18 kB
build/assets/roboto-latin-ext-400-normal-c2b94086.woff       10.21 kB
build/assets/roboto-latin-ext-300-normal-35da7ccd.woff       10.36 kB
build/assets/roboto-latin-ext-300-normal-b076e863.woff2      11.80 kB
build/assets/roboto-latin-ext-500-normal-7f1c829b.woff2      11.80 kB
build/assets/roboto-latin-ext-700-normal-fc66f942.woff2      11.82 kB
build/assets/roboto-latin-ext-400-normal-3c23eb02.woff2      11.87 kB
build/assets/roboto-cyrillic-ext-700-normal-8ea7934f.woff    13.43 kB
build/assets/roboto-cyrillic-ext-500-normal-57138788.woff    13.45 kB
build/assets/roboto-cyrillic-ext-400-normal-0a32035a.woff    13.47 kB
build/assets/roboto-cyrillic-ext-300-normal-5e06c977.woff    13.55 kB
build/assets/roboto-latin-400-normal-a9fdbefa.woff           14.38 kB
build/assets/roboto-latin-700-normal-d89bc0fc.woff           14.42 kB
build/assets/roboto-latin-500-normal-3ac31048.woff           14.42 kB
build/assets/roboto-latin-300-normal-ddb5c61d.woff           14.59 kB
build/assets/roboto-cyrillic-ext-700-normal-3c505383.woff2   14.68 kB
build/assets/roboto-cyrillic-ext-500-normal-aeed0e51.woff2   14.97 kB
build/assets/roboto-cyrillic-ext-300-normal-435e4b7f.woff2   15.00 kB
build/assets/roboto-cyrillic-ext-400-normal-b7ef2cd1.woff2   15.34 kB
build/assets/roboto-latin-300-normal-f7591131.woff2          15.74 kB
build/assets/roboto-latin-400-normal-f6734f81.woff2          15.74 kB
build/assets/no-image-8357d694.png                           15.80 kB
build/assets/roboto-latin-700-normal-f5aebdfe.woff2          15.86 kB
build/assets/roboto-latin-500-normal-b0195382.woff2          15.92 kB
build/assets/logo-b4500173.png                               74.85 kB
build/assets/style-b575b3e9.css                              23.48 kB │ gzip:  10.39 kB
build/assets/react-dea7f807.js                                7.72 kB │ gzip:   3.07 kB │ map:    17.19 kB
build/assets/index-33e96467.js                               80.62 kB │ gzip:  22.25 kB │ map:   337.65 kB
build/assets/konva-52bd506e.js                              198.14 kB │ gzip:  52.88 kB │ map:   706.73 kB
build/assets/mui-e61aa094.js                                294.28 kB │ gzip:  86.68 kB │ map: 1,486.85 kB
build/assets/mui-x-9b59a570.js                              326.95 kB │ gzip:  85.20 kB │ map: 1,243.94 kB
build/assets/vendor-f69745fe.js                             334.14 kB │ gzip: 109.96 kB │ map: 1,426.11 kB
build/assets/react-libs-14a066ad.js                         351.32 kB │ gzip: 109.16 kB │ map: 1,153.99 kB
✓ built in 22.32s

@paazmaya paazmaya marked this pull request as ready for review September 19, 2023 10:44
@paazmaya paazmaya requested a review from pashidlos September 19, 2023 10:44
@paazmaya
Copy link
Contributor Author

This reveals nicely how much weight each bigger library group bring, specifically MUI-X DataGrid.

@paazmaya paazmaya force-pushed the fine-tuning-manual-chunks branch from 7da25a7 to 834a060 Compare September 20, 2023 06:38
@paazmaya
Copy link
Contributor Author

Now with smallest treeshaking preset, and module side effects being true:


> [email protected] build
> vite build

vite v4.4.9 building for production...
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (10:12) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js (175:21) Use of eval in "node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 12520 modules transformed.
build/index.html                                              1.15 kB │ gzip:   0.46 kB
build/assets/roboto-vietnamese-700-normal-d986b503.woff       4.73 kB
build/assets/roboto-vietnamese-500-normal-7899e6a5.woff       4.73 kB
build/assets/roboto-vietnamese-400-normal-d2390f1a.woff       4.75 kB
build/assets/roboto-vietnamese-300-normal-7747ef64.woff       4.77 kB
build/assets/roboto-vietnamese-300-normal-51f3f418.woff2      5.47 kB
build/assets/roboto-vietnamese-700-normal-4ec57f2a.woff2      5.55 kB
build/assets/roboto-vietnamese-400-normal-77b24796.woff2      5.56 kB
build/assets/roboto-vietnamese-500-normal-0948409a.woff2      5.60 kB
build/assets/roboto-greek-700-normal-3f1a5012.woff            6.30 kB
build/assets/roboto-greek-500-normal-93181eb7.woff            6.32 kB
build/assets/roboto-greek-400-normal-076b9dc1.woff            6.35 kB
build/assets/roboto-greek-300-normal-6bb1ef10.woff            6.44 kB
build/assets/roboto-greek-700-normal-1c9cc76f.woff2           6.94 kB
build/assets/roboto-greek-500-normal-713780d8.woff2           7.02 kB
build/assets/roboto-greek-400-normal-daf51ab5.woff2           7.11 kB
build/assets/roboto-greek-300-normal-455c2c1a.woff2           7.12 kB
build/assets/roboto-cyrillic-400-normal-adba67d2.woff         8.39 kB
build/assets/roboto-cyrillic-300-normal-c07952fe.woff         8.43 kB
build/assets/roboto-cyrillic-700-normal-6f82c5e2.woff         8.66 kB
build/assets/roboto-cyrillic-500-normal-4bc088e9.woff         8.70 kB
build/assets/roboto-cyrillic-300-normal-47aa3bfa.woff2        9.58 kB
build/assets/roboto-cyrillic-400-normal-495d38d4.woff2        9.63 kB
build/assets/roboto-cyrillic-700-normal-6a84eeee.woff2        9.64 kB
build/assets/roboto-cyrillic-500-normal-3728fbdd.woff2        9.84 kB
build/assets/roboto-latin-ext-700-normal-3d1cbacf.woff       10.17 kB
build/assets/roboto-latin-ext-500-normal-a303676a.woff       10.18 kB
build/assets/roboto-latin-ext-400-normal-c2b94086.woff       10.21 kB
build/assets/roboto-latin-ext-300-normal-35da7ccd.woff       10.36 kB
build/assets/roboto-latin-ext-300-normal-b076e863.woff2      11.80 kB
build/assets/roboto-latin-ext-500-normal-7f1c829b.woff2      11.80 kB
build/assets/roboto-latin-ext-700-normal-fc66f942.woff2      11.82 kB
build/assets/roboto-latin-ext-400-normal-3c23eb02.woff2      11.87 kB
build/assets/roboto-cyrillic-ext-700-normal-8ea7934f.woff    13.43 kB
build/assets/roboto-cyrillic-ext-500-normal-57138788.woff    13.45 kB
build/assets/roboto-cyrillic-ext-400-normal-0a32035a.woff    13.47 kB
build/assets/roboto-cyrillic-ext-300-normal-5e06c977.woff    13.55 kB
build/assets/roboto-latin-400-normal-a9fdbefa.woff           14.38 kB
build/assets/roboto-latin-700-normal-d89bc0fc.woff           14.42 kB
build/assets/roboto-latin-500-normal-3ac31048.woff           14.42 kB
build/assets/roboto-latin-300-normal-ddb5c61d.woff           14.59 kB
build/assets/roboto-cyrillic-ext-700-normal-3c505383.woff2   14.68 kB
build/assets/roboto-cyrillic-ext-500-normal-aeed0e51.woff2   14.97 kB
build/assets/roboto-cyrillic-ext-300-normal-435e4b7f.woff2   15.00 kB
build/assets/roboto-cyrillic-ext-400-normal-b7ef2cd1.woff2   15.34 kB
build/assets/roboto-latin-300-normal-f7591131.woff2          15.74 kB
build/assets/roboto-latin-400-normal-f6734f81.woff2          15.74 kB
build/assets/no-image-8357d694.png                           15.80 kB
build/assets/roboto-latin-700-normal-f5aebdfe.woff2          15.86 kB
build/assets/roboto-latin-500-normal-b0195382.woff2          15.92 kB
build/assets/logo-b4500173.png                               74.85 kB
build/assets/style-b575b3e9.css                              23.48 kB │ gzip:  10.39 kB
build/assets/react-b59279c4.js                                7.72 kB │ gzip:   3.07 kB │ map:    17.19 kB
build/assets/index-c50482df.js                               80.56 kB │ gzip:  22.23 kB │ map:   337.61 kB
build/assets/konva-820fa34f.js                              198.11 kB │ gzip:  52.87 kB │ map:   706.68 kB
build/assets/mui-eb20d1d9.js                                294.21 kB │ gzip:  86.61 kB │ map: 1,486.72 kB
build/assets/mui-x-6f6bf450.js                              326.83 kB │ gzip:  85.18 kB │ map: 1,243.90 kB
build/assets/vendor-eccfbc1f.js                             333.61 kB │ gzip: 109.71 kB │ map: 1,420.43 kB
build/assets/react-libs-8e21e2e0.js                         349.55 kB │ gzip: 108.71 kB │ map: 1,151.62 kB
✓ built in 23.76s

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@paazmaya paazmaya changed the title Starting to fine tune manual chunks Remove manual chunks and disable inlining assets Sep 26, 2023
@paazmaya
Copy link
Contributor Author

@pashidlos any chance of getting this forward?

Copy link
Member

@pashidlos pashidlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paazmaya paazmaya merged commit b48be4f into master Jan 16, 2024
@paazmaya paazmaya deleted the fine-tuning-manual-chunks branch January 16, 2024 15:54
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.

2 participants