alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
7.99k stars 627 forks source link

[BUG] __esmodule flag in rax result #2199

Closed SoloJiang closed 3 years ago

SoloJiang commented 3 years ago

Rax Core entry strategy is not clear enough: https://unpkg.com/rax@1.2.0/index.js

As you see, it will return ./dist/rax.min.js in production, and return ./lib/index.js in development.

Another difference is that, lib result will add __esmodule = true flag, but dist result not. It will be wrong in this case:

image

SoloJiang commented 3 years ago

https://github.com/alibaba/rax/issues/2217