-
Notifications
You must be signed in to change notification settings - Fork 93
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
Need includePattern
as option
#62
Comments
That seems like something that babel itself can handle in the config? |
This is a nonissue if you do I could close this @ljharb but would love to get some idea of how you mean to configure the babel config. If you DID want to declare a variable and require a
|
I'm not sure what you mean; you're saying if you inline the require, you bypass the plugin? |
Exactly. But also out of pure curiosity I tried the |
So, fwiw, #28 should have covered that - meaning, it's a bug that it's not transforming the inline require. As for |
Ok I've taken my Meanwhile, I want to double check that you think an inline require should be transformed. How would that look in application? |
@knoid I thought I'd cc you in regards to the inline require behavior. |
Ok just discussed this in babel slack The |
Makes sense. |
+1 |
Hey Anyone working on this issue ? I am also facing similar issue wherein i want only specific set of svg's to be converted into ReactComponent . includeOptions would be great to have, in the meantime how can i ignore all paths , except certian folder with ignorePattern ? so that only required folder is included ? |
My issue is that we want to use this babel transform just for icons that we want to style - inline icons that should have the same color as surrounding text, etc.
On the other hand, we'd like to use webpack's
url-loader
to handle all larger "illustration" SVGs. We would rather put those inimg
tags and let them be cached by the browser and not have them in our javascript bundle.To do so, an
includePattern
could be used that would only use this babel transform on (for example):*.icon.svg
*/icons/*.svg
Thoughts? I'm about to make a PR.
The text was updated successfully, but these errors were encountered: