hot-import icon indicating copy to clipboard operation
hot-import copied to clipboard

Prepare to ESM support

Open huan opened this issue 3 years ago • 0 comments

Link to https://github.com/Chatie/tsconfig/issues/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)

huan avatar Aug 26 '21 04:08 huan