Closed privatenumber closed 3 years ago
:tada: This issue has been resolved in version 2.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Amazing, thank you @egoist
Any idea about this one?
Converting "require" to "esm" is currently not supported
{
column: 30,
file: '/code/vulcan-npm/starters/express/.yalc/@vulcanjs/mongo/dist/index.js',
length: 7,
line: 38,
lineText: 'var import_mongoose = __toESM(require("mongoose"));',
namespace: '',
suggestion: ''
}
Converting "require" to "esm" is currently not supported
I got a few errors like this (can provide repro if needed). I seem to hit https://github.com/evanw/esbuild/issues/566
Currently, when importing native ESM packages (
"type": "module"
), I get the following error:I believe this is happening because esbuild is converting the esm import to cjs requires.
Seems like there's an overrides option to pass in
format: 'esm'
here, but I'm guessing this is only available for the Node.js API.Can esbuild-register pass in
format: 'esm'
to esbuild if a flag is set or if the current projectpackage.json
hastype: 'module'
set?