Package Exports
- @gongt/fix-esm
- @gongt/fix-esm/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gongt/fix-esm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fix-esm
fix ERR_REQUIRE_ESM with realtime esbuild transform.
require('@gongt/fix-esm') will register legacy commonjs loader, mutiple call will ignored. (no way to unregister)
When ERR_REQUIRE_ESM happen, it will spawn esbuild to compile target file. loaded module will inside require cache. compiled result will save at filename.jsc to speed up next run.
It's best to use this package in a final-end-user project, not in a library, many people have thier own fix-esm method, may cause conflict.