-
Notifications
You must be signed in to change notification settings - Fork 76
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
Converting dynamic import #141
Comments
I agree that this would be good to support, however dynamic import has the entirety of JS available for constructing the path, so we'd have to decide on specific patterns to match. Starting with non-tagged template literals with a leading non-empty literal section seems good. I'll take a stab at this later today. |
Yea pattern support would be awesome 👍 |
The code in your sample should work now with version 6.6.0. Feel free to open another issue if it doesn't work as you expect. |
Just to say thanks, everything works as expected now. |
In cases where the path is dynamically I have a bit of hard time to convert it. For example
As long as the parameters can be pre-calculated is not a problem but if they are not it can't be used. So in this example here, I can handle the second instance of import by adding an import function in the functions array of this plugin, but for the first instance direct processing is aborted because it can't simply evaluate the path.
I could handle it in the bundler it just would been good if there was a way from within the plugin to cover that case too.
The text was updated successfully, but these errors were encountered: