-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Difference with airbnb/babel-plugin-inline-react-svg #140
Comments
SVGR doesn't have a Babel plugin because it doesn't not work in sync mode (Prettier, etc...). But it is plan to support this way too. |
I think now I can get an explanation: It is better to use What's the difference with this plugin? This plugin work with webpack, the svg is converted to react using loaders, and after the production build, you won't need any plugin as well. This fits if you are in an application, not in a module. What about modules? rollup can be used to create modules, and svgr have a module for it. If you want to bundle your code with rollup, it is perfect, but if you want to transpile your We personally choose to use We do not use |
One of my coworker did work with https://github.com/airbnb/babel-plugin-inline-react-svg in a distributed package.
I've told him to use svgr because it is now the default with create-react-app.
I would like to ask the same question as in #74 , how to deal when you are writing a distributed package?
What is the difference between this plugin and the babel plugin?
So far we didn't find a working way to import
*.svg
withwebpack
androllup
when it comes to distributed package.The text was updated successfully, but these errors were encountered: