tslib required?
patlux opened this issue · comments
I have a build.ts
which I run to compile my source files with esbuild
. To run it I have a npm-run-script:
"compile": "node -r esbuild-runner/register build.ts",
We do not have tslib
explicitly installed in our project. When running the above command we get the following error:
/Users/<project-folder>/node_modules/esbuild-runner/lib/esbuild.js:22
externals = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], Object.keys((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}), true), Object.keys((_b = pkg.devDependencies) !== null && _b !== void 0 ? _b : {}), true);
TypeError: (0 , tslib_1.__spreadArray) is not a function
at Object.<anonymous> (/Users/<project-folder>/node_modules/esbuild-runner/lib/esbuild.js:22:70)
If I add tslib
explicitly to the project, the above command runs without any problems.