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

BRAIN-39 - Replaced webpack with vite #109

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

cyl3x
Copy link
Contributor

@cyl3x cyl3x commented Sep 9, 2024

  • Replaced webpack with vite and slim down deps
    • dev bundle from 24MB to 16MB
    • prod bundle from 9.5MB to 8.8MB/6.3MB
  • Removed unnecessary eslint bloat
  • Added hmr mode though npm run watch

@cyl3x cyl3x added the enhancement New feature or request label Sep 9, 2024
@cyl3x cyl3x requested a review from lernhart September 9, 2024 09:39
@cyl3x cyl3x force-pushed the brain-39/replaced-webpack-with-vite branch 3 times, most recently from b9cb20c to 1d51f63 Compare September 9, 2024 12:14
@lernhart
Copy link
Member

lernhart commented Sep 9, 2024

Will this build a single entrypoint .js and .css file ?

@cyl3x
Copy link
Contributor Author

cyl3x commented Sep 9, 2024

It will chuck the build, producing 3 entry points (total 8.8MB):

4,6M    public/build/admin.css (4MB fonts)
640K    public/build/admin.js
88K     public/build/polyfills.js
3.4M    public/build/assets (async loaded files)

We could bundle it into single files to allow better client side caching (total 6.3MB):

4.6M    public/build/admin.css
1.5M    public/build/admin.js (size due to included meteor-icons)
88K     public/build/polyfills.js

@cyl3x cyl3x force-pushed the brain-39/replaced-webpack-with-vite branch 6 times, most recently from 7228cc3 to 7161fc5 Compare September 16, 2024 07:14
@cyl3x cyl3x force-pushed the brain-39/replaced-webpack-with-vite branch from 7161fc5 to 6a37810 Compare September 23, 2024 06:18
Copy link

@Bird87ZA Bird87ZA left a comment

Choose a reason for hiding this comment

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

I don't know much about vite, but there's no glaring issue popping out to me

@cyl3x cyl3x force-pushed the brain-39/replaced-webpack-with-vite branch 2 times, most recently from f660b88 to d83a876 Compare September 25, 2024 14:02
@cyl3x cyl3x force-pushed the brain-39/replaced-webpack-with-vite branch from d83a876 to eb84f42 Compare September 25, 2024 14:15
@cyl3x cyl3x merged commit 2d67ee3 into trunk Sep 25, 2024
9 checks passed
@cyl3x cyl3x deleted the brain-39/replaced-webpack-with-vite branch September 25, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants