Open Crownico opened 2 months ago
I would like the generated results to be automatically executed following the successful completion of the compilation process, and for that compilation to utilize the configuration corresponding to the specific environment.
"scripts": { "dev": "tsup --watch --env.NODE_ENV development --onSuccess 'node dist/app.js'" }
// tsup.config.ts import { defineConfig } from "tsup"; const isDev = process.env.NODE_ENV === "development"; console.log("isDev", process.env.NODE_ENV); export default defineConfig({ target: "es2020", entry: ["lib/app.ts"], outDir: "dist", format: ["cjs", "esm"], dts: !isDev, minify: !isDev, clean: true, sourcemap: isDev });
result:
Why doesn't the flag --env.NODE_ENV and the option --onSuccess take effect? What should I do?
--env.NODE_ENV
--onSuccess
I would like the generated results to be automatically executed following the successful completion of the compilation process, and for that compilation to utilize the configuration corresponding to the specific environment.
result:
Why doesn't the flag
--env.NODE_ENV
and the option--onSuccess
take effect? What should I do?Upvote & Fund