-
Notifications
You must be signed in to change notification settings - Fork 204
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
Compatibility with babel-plugin-import-glob #180
Comments
Thanks for the detailed issue, I'll be able to take a look at this in a few hours. Possible solution I see is silencing warnings for some paths as a config option. |
The newest beta version should be working before every other plugin if it is placed before them. The module-resolver plugin is now traversing the whole file on Program enter. I need to think a bit on the second problem. @tleunen Maybe you know how to handle this situation well? |
This is really a complex problem, because one plugin requires the other to fully resolve the path... The only thing I'd see would be to provide a custom way to resolve the path (see #165), so the user could use something internal from the glob import inside our plugin |
I was thinking about this recently; maybe we could allow aliasing for all the paths? Normal aliases wouldn't be affected if they weren't starting with "." or "/" already, and RegExp aliases could be used to provide the root. |
So, removing the check for a valid path? It would work for the alias (actually, the first version didn't check the validity), but how would you make the root resolution then? |
Closing because of inactivity. |
I'm a contributor of babel-plugin-import-glob. I'm trying to get it working with this plugin. I have two issues:
1:
module-resolver does its transformation after import-glob. It looks like there are 4 ways to do transformations.
I'm not sure which one is best. I could change import-glob to exit and have it pick up the new path. So I do have a solution for this one. Just thought I would bring it up anyway - perhaps babel has introduced new ways of ordering plugins?
2:
module-resolver doesn't resolve unless it can find the file. So if I have something like
src/field/*/component.js
it won't resolve the file. Then import-glob can't find it either because thesrc/field
part was not resolved.I'm not sure how to solve this one. Both plugins want to resolve the file(s). Ideally I would like a way to resolve the
src/field
part of the path, ignoring (and preserving) the*/components.js
part.The text was updated successfully, but these errors were encountered: