After bumping to 3.4.1 from 3.3.3 I'm encountering the following exception in cases where esbuild-register is registered more than once.
SyntaxError: Identifier '__esbuild_register_import_meta_url__' has already been declared
The workaround for this in cases where I can control the registration is
if (!('.ts' in require.extensions)) {
require('esbuild-register/dist/node').register();
}
In some cases I can not control the registration though so the discussed workaround can't be applied.
This is the case e.g. for jest configuration files authored in TypeScript.
After bumping to
3.4.1
from3.3.3
I'm encountering the following exception in cases whereesbuild-register
is registered more than once.The workaround for this in cases where I can control the registration is
In some cases I can not control the registration though so the discussed workaround can't be applied. This is the case e.g. for
jest
configuration files authored in TypeScript.