vite-plugin-svgr
Vite plugin to transform SVGs into React components (by pd4d10)
vite-tsconfig-paths
Support for TypeScript's path mapping in Vite (by aleclarson)
Our great sponsors
vite-plugin-svgr | vite-tsconfig-paths | |
---|---|---|
4 | 5 | |
459 | 1,136 | |
- | - | |
7.2 | 6.5 | |
about 1 month ago | 15 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vite-plugin-svgr
Posts with mentions or reviews of vite-plugin-svgr.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-09.
-
Chrome Extension with React + CRXJS + Vite + Docker
If you want to use svg with React components, install vite-plugin-svgr.
-
Migrating from Create React App (CRA) to Vite
We need vite-plugin-svgr in order to import SVGs as React components. For example:
-
Repeating variable names for imports, types and switch. Got to be a better way!
If you're using Vite, then maybe try one of these: - https://github.com/pd4d10/vite-plugin-svgr - https://github.com/vbenjs/vite-plugin-svg-icons
-
Using Vite with React
Instead of webpack svgr - vite has a community plugin vite-plugin-svgr. Looking at its source code I can tell that it does the work as needed. In the future, I may want to add more SVGR options (currently for custom colors we use css currentColor property), so I may contribute it or create a similar plugin. NOTE: vite bundles the static svg in addition to assets even if you use vite-plugin-svgr. So many useless files will be generated. This is a minor issue that can be unnoticeable. I created a script for deleting those files (it has 0 impacts on the bundle because the client does not download those chunks).
vite-tsconfig-paths
Posts with mentions or reviews of vite-tsconfig-paths.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-30.
-
From webpack to vite: custom module resolution, sass import, babel config
Following suggestion in the issue, i looked at vite-tsconfig-paths which is even better because i already have configured vscode through typescript config:
-
Migrating from Create React App (CRA) to Vite
We need vite-tsconfig-paths in order to tell Vite how to resolve absolute paths from the tsconfig file. This way you can import modules like this:
-
Using Vite with React
We already have configured path aliases with webpack and tsconfig - so I wanted to keep that behavior. Luckily we have the vite-tsconfig-paths exactly for that. It worked well. I could also try using the alias for that.
What are some alternatives?
When comparing vite-plugin-svgr and vite-tsconfig-paths you can also consider the following projects:
webpack-bundle-analyzer - Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
svgr - Transform SVGs into React components 🦁
DefinitelyTyped - The repository for high quality TypeScript type definitions.
awesome-vite - ⚡️ A curated list of awesome things related to Vite.js
react-markdown - Markdown component for React
tsconfig-paths-webpack-plugin - Load modules according to tsconfig paths in webpack.
rollup-plugin-visualizer - 📈⚖️ Visuallize your bundle
Snowpack - ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to: https://github.com/FredKSchott/snowpack]
esbuild - An extremely fast bundler for the web