Git Product home page Git Product logo

Comments (3)

sfishel18 avatar sfishel18 commented on June 12, 2024

@rgraue would you be open to a POC with vite? tbh i haven't used it myself, but i am very familiar with the pain of slow webpack builds and i've talked to other devs who switched from webpack to vite and saw things speed up significantly.

from home-energy-calculator.

sfishel18 avatar sfishel18 commented on June 12, 2024

@rgraue i created a PR with what it would look like to migrate to vite. everything seems to be working well for local development, and the live reloads on a code change are quite a bit faster.

the production build output looks comparable (a ~1.1MB entry file and some other smaller lazy loaded files)

webpack:

--> ls -lah -R dist

total 2856
drwxr-xr-x  18 simonfishel  staff   576B May 26 20:00 .
drwxr-xr-x   4 simonfishel  staff   128B May 26 20:17 ..
-rw-r--r--   1 simonfishel  staff    10K May 26 20:00 332.index.bundle.js
-rw-r--r--   1 simonfishel  staff    61B May 26 20:00 332.index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff   151K May 26 20:00 376.index.bundle.js
-rw-r--r--   1 simonfishel  staff    22K May 26 20:00 624.index.bundle.js
-rw-r--r--   1 simonfishel  staff   188B May 26 20:00 624.index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff   1.2K May 26 20:00 756.index.bundle.js
-rw-r--r--   1 simonfishel  staff    61B May 26 20:00 756.index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff   4.6K May 26 20:00 820.index.bundle.js
-rw-r--r--   1 simonfishel  staff   462B May 26 20:00 820.index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff    25K May 26 20:00 88289a181451255b4e814d5b490d81ac.png
-rw-r--r--   1 simonfishel  staff   6.6K May 26 20:00 920.index.bundle.js
-rw-r--r--   1 simonfishel  staff    61B May 26 20:00 920.index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff   996B May 26 20:00 favicon.ico
-rw-r--r--   1 simonfishel  staff   1.1M May 26 20:00 index.bundle.js
-rw-r--r--   1 simonfishel  staff    16K May 26 20:00 index.bundle.js.LICENSE.txt
-rw-r--r--   1 simonfishel  staff   447B May 26 20:00 index.html

vite:

--> ls -lah -R dist

total 8
drwxr-xr-x   4 simonfishel  staff   128B May 26 20:17 .
drwxr-xr-x   4 simonfishel  staff   128B May 26 20:17 ..
drwxr-xr-x  10 simonfishel  staff   320B May 26 20:17 assets
-rw-r--r--   1 simonfishel  staff   577B May 26 20:17 index.html

dist/assets:
total 2728
drwxr-xr-x  10 simonfishel  staff   320B May 26 20:17 .
drwxr-xr-x   4 simonfishel  staff   128B May 26 20:17 ..
-rw-r--r--   1 simonfishel  staff    25K May 26 20:17 dial_bg-CfmtVHzX.png
-rw-r--r--   1 simonfishel  staff   1.1M May 26 20:17 index-CLBrbrLE.js
-rw-r--r--   1 simonfishel  staff   1.7K May 26 20:17 index-w5522CNl.css
-rw-r--r--   1 simonfishel  staff   146K May 26 20:17 index.es-BOAG7gwp.js
-rw-r--r--   1 simonfishel  staff    10K May 26 20:17 ios.transition-B4EX8FTN.js
-rw-r--r--   1 simonfishel  staff   1.0K May 26 20:17 md.transition-BzkoYX_b.js
-rw-r--r--   1 simonfishel  staff    21K May 26 20:17 purify.es-BVj1AYrp.js
-rw-r--r--   1 simonfishel  staff   6.7K May 26 20:17 swipe-back-NVNNEgnS.js

the only open question i have is whether the browserslist configuration can be supported in vite

from home-energy-calculator.

rgraue avatar rgraue commented on June 12, 2024

@sfishel18 sorry, somehow missed all these notifications! This looks awesome though!

from home-energy-calculator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.