-
Official Vite plugins have been optimizing performance, such as vitejs/vite-plugin-react which reduces Node.js startup time by dynamically importing large dependencies.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
There are many ways to identify this performance issue, such as using vite --debug plugin-transform or vite-plugin-inspect to Alternatively, you can visit the site after running vite --profile, press p + enter in the terminal to record a .cpuprofile, and then use a tool like speedscope to examine the configuration file and identify bottlenecks.
-
As an example, vite-plugin-eslint is still recommended in many community articles, but as of today it hasn't been updated in two years, and support for newer versions of Vite and ESLint is mediocre.
-
There are many ways to identify this performance issue, such as using vite --debug plugin-transform or vite-plugin-inspect to Alternatively, you can visit the site after running vite --profile, press p + enter in the terminal to record a .cpuprofile, and then use a tool like speedscope to examine the configuration file and identify bottlenecks.
-
vite-plugin-checker
π¬ Vite plugin that provide checks of TypeScript, ESLint, vue-tsc, Stylelint and more.
Once you've identified a performance issue, you can consider forking and improving the appropriate plugin, or just using a replacement. For the example above, you might consider replacing it with vite-plugin-checker, @nabla/vite-plugin-eslint or vite-plugin-eslint2, all of which support asynchronous ESLint checksums so as not to particularly impact performance and development experience, while still serving the purpose of ESLint checksums.
-
Using a more raw toolchain is also a good way to speed things up; the SWC website shows it to be 20 to 70 times faster than Babel, and there are tons of speed advantages in complex real-world applications, which proves that rawness can be a big help in speeding things up. Instead of vite-plugin-react, you can use @vitejs/plugin-react-swc, with LightningCSS instead of PostCSS, SWC or esbuild instead of Babel, etc. etc. to achieve better performance.
-
Once you've identified a performance issue, you can consider forking and improving the appropriate plugin, or just using a replacement. For the example above, you might consider replacing it with vite-plugin-checker, @nabla/vite-plugin-eslint or vite-plugin-eslint2, all of which support asynchronous ESLint checksums so as not to particularly impact performance and development experience, while still serving the purpose of ESLint checksums.
-
Using a more raw toolchain is also a good way to speed things up; the SWC website shows it to be 20 to 70 times faster than Babel, and there are tons of speed advantages in complex real-world applications, which proves that rawness can be a big help in speeding things up. Instead of vite-plugin-react, you can use @vitejs/plugin-react-swc, with LightningCSS instead of PostCSS, SWC or esbuild instead of Babel, etc. etc. to achieve better performance.
-
For 4.3 <= Vite < 5, vite-plugin-warmup is required, there is no support for lower versions.
-
Using a more raw toolchain is also a good way to speed things up; the SWC website shows it to be 20 to 70 times faster than Babel, and there are tons of speed advantages in complex real-world applications, which proves that rawness can be a big help in speeding things up. Instead of vite-plugin-react, you can use @vitejs/plugin-react-swc, with LightningCSS instead of PostCSS, SWC or esbuild instead of Babel, etc. etc. to achieve better performance.
-
If you want to use ESLint to force explicit import paths, you can configure import/extensions or import-x/extensions rule, as shown below.
-
eslint-plugin-import-x
`eslint-plugin-import-x` is a fork of `eslint-plugin-import` that aims to provide a more performant and more lightweight version of the original plugin.
If you want to use ESLint to force explicit import paths, you can configure import/extensions or import-x/extensions rule, as shown below.