but when i run sst dev (while try to use the esbuild plugin) i get the following error
~ Deploying
| Error ReferenceError: __filename is not defined in ES module scope
| at isFileSystemCaseSensitive (file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:7301:45)
| at getNodeSystem (file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:7066:45)
| at file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:7535:19
| at file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:7542:5
| at node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js (file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:7557:1)
| at __require2 (file:///Users/yotam/dev/nest-ion/.sst/platform/eval/eval-1715262938079.mjs:24:50)
| at node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.21.1/node_modules/@anatine/esbuild-decorators/src/lib/esbuild-decorators.js (file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.21.1/packages/esbuild-decorators/src/lib/esbuild-decorators.ts:4:1)
| at __require2 (file:///Users/yotam/dev/nest-ion/.sst/platform/eval/eval-1715262938079.mjs:24:50)
| at node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.21.1/node_modules/@anatine/esbuild-decorators/src/index.js (file:///Users/yotam/dev/nest-ion/node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.21.1/packages/esbuild-decorators/src/index.ts:1:1)
| at __require2 (file:///Users/yotam/dev/nest-ion/.sst/platform/eval/eval-1715262938079.mjs:24:50)
Hello,
using sst - 0.0.359
I can also confirm i get the same error with https://github.com/thomaschaaf/esbuild-plugin-tsc
while trying to get a POC running Nestjs in ion to potentially replace serverless framework.
We currently use Nestjs on serverless framework, using esbuild using the following esbuild config
esbuild.plugins.js
using nodejs install i was able to replicate the exclude functionality above sst.config.ts
but when i run sst dev (while try to use the esbuild plugin) i get the following error