Skip to content

Commit 73ac0b0

Browse files
committed
Replace define with env as it is the same thing.
- `env` is the same thing as `define` with `JSON.stringify`.
1 parent 30dd4b2 commit 73ac0b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolkit/tsup.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default defineConfig((options) => {
180180

181181
if (env) {
182182
Object.assign(defineValues, {
183-
'process.env.NODE_ENV': JSON.stringify(env),
183+
NODE_ENV: env,
184184
})
185185
}
186186

@@ -207,7 +207,7 @@ export default defineConfig((options) => {
207207
options.conditions = ['browser']
208208
},
209209

210-
define: defineValues,
210+
env: defineValues,
211211
async onSuccess() {
212212
if (format === 'cjs' && name === 'production.min') {
213213
writeCommonJSEntry(outputFolder, prefix)
@@ -243,7 +243,7 @@ export default defineConfig((options) => {
243243
// fs.copyFileSync(inputTypedefsPath, outputTypedefsPath)
244244
}
245245
},
246-
}
246+
} satisfies TsupOptions
247247
})
248248

249249
return artifactOptions

0 commit comments

Comments
 (0)