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: Transform classes before compiling into bytecode #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radislav
Copy link

@radislav radislav commented Sep 29, 2023

Add classes transforming for bytecode plugin to be able to compile into bytecode more packages

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

@alex8088
Copy link
Owner

alex8088 commented Oct 5, 2023

@radislav

Thank you for your contribution.

This problem usually occurs because the third-party module used uses unconventional class writing methods. But if the module supports cjs, automatically excluding the build through the externalizeDevPlugin (making sure the module is installed in deps), this problem will not occur. But if the module only supports esm, this class writing method is not supported. Although it needs to be rebuilt, this problem will not occur.

I'm aware that this problem exists 🤔 , but I haven't come across a module that doesn't solve it via the externiazedep plugin. Because it is more reasonable to solve this problem via the externiazedep plugin, can you list the modules that need to be handled this way? Or provide more detailed information.

@radislav
Copy link
Author

radislav commented Oct 5, 2023

@alex8088
I found this issue with bottleneck, socks-proxy-agent and crypto-js
It was ok when I used require without externalizing, but I decided I needed to keep dependencies clear for my own reason :) And these 3 packages stopped me until I used this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants