svgr
vite
Our great sponsors
svgr | vite | |
---|---|---|
30 | 784 | |
10,285 | 64,457 | |
- | 1.6% | |
6.1 | 9.9 | |
about 2 months ago | 6 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
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.
svgr
-
Nx + NextJS + Docker - The Nx way: Creating the NextJS application
//@ts-check // eslint-disable-next-line @typescript-eslint/no-var-requires const { composePlugins, withNx } = require('@nx/next'); /** * @type {import('@nx/next/plugins/with-nx').WithNxOptions} **/ const nextConfig = { nx: { // Set this to true if you would like to use SVGR // See: https://github.com/gregberge/svgr svgr: false, }, }; const plugins = [ // Add more Next.js plugins to this list if needed. withNx, ]; module.exports = composePlugins(...plugins)(nextConfig);
- How do I use SVG icons in React?
-
One way of building an SVG icon library for your project
Really interesting framework agnostic approach, but I think SVGR is a better option for my React homies. It imports an SVG file as a React component. Shouts also to react-icons if Font Awesome, Material Icons and friends are more your bag.
-
Alternative libs to migrate from React to Vue (or Vue to React)
SVGR
-
Power up SVGs with React and CSS
There is another way to import an SVG in Create React App, though. We can import the SVG as a ReactComponent. This is because CRA leverages SVGR to process SVGs.
-
Создаем React-компоненты иконок с помощью Figma API и SVGR. Часть 2.
const { types } = require('@babel/core'); module.exports = { ... template: function svgrCustomTemplate( { imports, interfaces, componentName, props, jsx, exports }, { tpl } ) { // меняем корневой элемент на SvgIcon jsx.openingElement.name.name = 'SvgIcon'; jsx.closingElement.name.name = 'SvgIcon'; // https://github.com/gregberge/svgr/issues/530 // при изменении корневого элемента пропадает спред пропсов // поэтому необходимо добавить спред пропсов самостоятельно jsx.openingElement.attributes.push( types.jSXSpreadAttribute(types.identifier('props')) ); return tpl` ${imports}; import { SvgIcon } from '../SvgIcon'; ${interfaces}; const ${componentName} = (${props}) => ( ${jsx} ); ${exports}; ` } }
-
Using SVGs in Common Lisp web apps with Djula
To solve these problems and have a better development workflow, I have created a package called cl-djula-svg which automates all the above steps for you. The inspiration for this package came from svgr which exactly does the same thing in React applications. It takes a SVG file, process some override logic, optimize it and create React wrapper components based on the SVG content.
-
Some svg icons wont show with react native svg
I normally use SVGR but every time a designer sends me an svg i’ll pass it in svgOmg that deletes all the unnecessary attributes and propietary code from figma, illustrator &co.
- External SVGs that you can style
-
How to debug from this error statement
https://github.com/gregberge/svgr/issues/362 this may help as well.
vite
-
RubyJS-Vite
Little confused as to why it has vite in it‘s name, it seems unrelated to https://vitejs.dev/
-
Deploy a react projects that are inside a subdirectories to GitHub Pages using GitHub Actions (CI/CD)
First you have to know that all those react projects are created using Vite, and for each of them, you need change the vite.config.ts file by adding the following configuration:
-
Collab Lab #66 Recap
JavaScript React Flowbite Tailwind Firebase - Auth, Database, and Hosting Vite
-
Use React.js with Laravel. Build a Tasklist app
For this full-stack single-page app, you'll use Vite.js as your frontend build tool and the react-beautiful-dnd package for draggable items.
-
Top 10 Tools Every React Developer Needs in 2024
Vite
-
Implementing SSO in React with GitHub OAuth2
Imagine a shiny new React app — that’s what we’ll build! We’ll use a cool tool called Vite to set it up.
-
Tutorial: React + Emailjs
If you want to learn more about the Vite build tool here is a link to the documentation.
-
Building a Fast, Efficient Web App: The Technology Stack of PromptSmithy Explained
We all know what React is at this point, but why use it with Vite and React Router DOM over something like NextJS?
-
Creating Nx Workspace with Eslint, Prettier and Husky Configuration
Vite [ https://vitejs.dev/ ]
-
Qilin: A Starter Project Template For Every Open Source Project
A great example of this is the introduction to the Vite project.
What are some alternatives?
Next.js - The React Framework
parcel - The zero configuration build tool for the web. 📦🚀
esbuild - An extremely fast bundler for the web
swc - Rust-based platform for the Web
astro - The web framework for content-driven websites. ⭐️ Star to support our work!
Rollup - Next-generation ES module bundler
Laravel Mix - The power of webpack, distilled for the rest of us.
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]
SvelteKit - web development, streamlined
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
nx - Smart Monorepos · Fast CI