Unexpected top-level await error
for type: module
+ top level await in node_modules
#552
Open
4 of 6 tasks
Labels
bug
Something isn't working
Acknowledgements
Minimal reproduction URL
https://github.com/JounQin/test/tree/tsx
Version
4.10.1
Node.js version
v20.11.0
Package manager
yarn
Operating system
macOS
Problem & expected behavior (under 200 words)
prettier@v3
is a dual package, I havetype: module
in mypackage.json
, it should be run in ESM module, and it will resolve its own configs withimport()
,@1stg/prettier-config
is a pure ESM package with top level await used, it should just work without runtime exceptionBut it just throws like the following:
I'm not for sure why
node_modules
packages are also transformed byesbuild
, is that expected to be transformed or configurable?Contributions
The text was updated successfully, but these errors were encountered: