Skip to content
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

feat: support transform imports #256

Closed
wants to merge 1 commit into from
Closed

feat: support transform imports #256

wants to merge 1 commit into from

Conversation

richardchen85
Copy link

Support transform imports like babel-plugin-transform-imports does

@privatenumber
Copy link
Owner

What for?

Also:

  • Please start with an Issue next time
  • No regex based analysis/transformations

@ghost ghost mentioned this pull request Jun 22, 2022
@ghost
Copy link

ghost commented Jun 22, 2022

We also need this feature, is it possible to continue the work?
Thanks

@richardchen85
Copy link
Author

@chengjiaapraamcos Unfortunately, I deleted the code. My code is based on regex analysis, which is not allowed by this repo.

@privatenumber
Copy link
Owner

In general, opening a PR without an explanation will never get approved. Based on #260, this feature is irrelevant to esbuild and doesn't make sense to be in this project.

Although it's out of scope, I encourage you to make your own Webpack loader with it and just chain it in your configuration.

BTW, your code isn't deleted. It's still viewable in this PR. But yeah, regex is not reliable. You should use es-module-lexer instead.

Repository owner locked as off-topic and limited conversation to collaborators Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants