-
Notifications
You must be signed in to change notification settings - Fork 205
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
3.0.0-beta.0: causes HTML import plugin to use incorrect path #178
Comments
Thanks for the repo, I managed to reproduce the error. |
The reason for this is that the plugin now applies the transforms at the end of processing the file:
Changing @tleunen Would you have anything against changing this? I didn't feel strongly about this before, but now I came to the conclusion that this plugin should have a higher priority because there are plugins that depend on the paths being aliased. The only plugins I could think of that could affect the code that module-resolver is working on are split into two categories:
So in the end I don't think this could break much stuff and would fix some other problems (like #84). |
Just a note, changing |
Both plugins use I thought the order of plugins in babel had an importance. So if module-resolver is set first, it should be executed before. In the end, I don't mind changing our plugin to use |
Here's a diagram that shows what's happening more accurately:
|
So yes, the order of the plugins is preserved, it's just that the "exit" of module-resolver happens later than the "exit" of transform-html-import-to-string. |
Oh right, because the logic changed to exit on the program instead of require/import/export :) |
@pglewis This is fixed on master and should be released in a few hours on npm. Thanks for your report! |
3.0.0-beta.2 is out. But obviously I failed releasing it under the |
ok here we go. But now beta.0 became the Roh people will understand it's a beta anyway :D |
Thanks so much again. I'll test this myself later but I'm confident it'll be working for my setup. |
Thank you @pglewis :) Let us know if you have any other issues with this beta.3 version Hopefully we can soon release this 3.0 |
And for closure: everything works splendidly for my configuration with 3.0.0-beta.3. I've swapped out our old path aliasing plugin for this one and merged it. Life is good. |
This works correctly for me in 2.7.0. I've cloned the poc repo with a commit that uses the
babel-plugin-transform-html-import-to-string
. The built file shows the results from running with v2.7.0. What little debugging I did, it appears as though beta may be causing the alias to be appended to the full path within the other plugin.https://github.com/pglewis/babel-plugin-module-resolver-types-isimport-poc
Thanks for all the help thus far. I'm looking forward to implementing this because it will fix some annoying IDE configuration issues with our modules.
The text was updated successfully, but these errors were encountered: