-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
Description
What is the correct command to set process.platform='linux'
?
$ NODE_ENV=production npx tsup ./x.ts --define.process.platform linux --minify
CLI Building entry: ./x.ts
CLI tsup v5.4.1
CLI Target: node12
CJS Build start
> error: Invalid define value (must be valid JSON syntax or a single identifier): [object Object]
CJS Build failed
Error: Build failed with 1 error:
error: Invalid define value (must be valid JSON syntax or a single identifier): [object Object]
at failureErrorWithLog (/home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:1493:15)
at /home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:1151:28
at runOnEndCallbacks (/home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:941:63)
at buildResponseToResult (/home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:1149:7)
at /home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:1258:14
at /home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:629:9
at handleIncomingPacket (/home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:726:9)
at Socket.readFromStdout (/home/xo/.npm/_npx/7d72304e626f8399/node_modules/esbuild/lib/main.js:596:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:312:12)