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

Prepare to ESM support #44

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Prepare to ESM support #44

wants to merge 9 commits into from

Conversation

huan
Copy link
Owner

@huan huan commented Aug 26, 2021

Link to Chatie/tsconfig#16

Hot Import in ESM

We can use import('module-name?timestamp=${Date.now()}') to reload the module.

However, we are facing the problem that: CJS & ESM code are not compatible in the Node.js level, which means that it will be very complicated if we want to make them work together.

For example, we can use export to export totally different codes for CJS & ESM, which means we will maintain two code bases for the different module systems.

Conclusion

I decided to give it up for now. (Aug 27, 2021)

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

Successfully merging this pull request may close these issues.

1 participant