module: only try to enrich CJS syntax errors
It is guaranteed that V8 throws a syntax error when `import` or `export` is used outside of ESM. Fixes: https://github.com/nodejs/node/issues/35687 PR-URL: https://github.com/nodejs/node/pull/35691 Reviewed-By:Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Guy Bedford <guybedford@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
parent
5b2c263b
Please register or sign in to comment