Skip to content

Commit 02de09a

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 3d2f07f commit 02de09a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tsup.config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export default defineConfig((options): Options[] => {
7070
'react-redux.browser': 'src/index.ts',
7171
},
7272
platform: 'browser',
73-
define: {
74-
'process.env.NODE_ENV': JSON.stringify('production'),
73+
env: {
74+
NODE_ENV: 'production'
7575
},
7676
format: ['esm'],
7777
outExtension: () => ({ js: '.mjs' }),
@@ -83,8 +83,8 @@ export default defineConfig((options): Options[] => {
8383
entry: {
8484
'react-redux.development': 'src/index.ts',
8585
},
86-
define: {
87-
'process.env.NODE_ENV': JSON.stringify('development'),
86+
env: {
87+
NODE_ENV: 'development'
8888
},
8989
format: ['cjs'],
9090
outDir: './dist/cjs/',
@@ -96,8 +96,8 @@ export default defineConfig((options): Options[] => {
9696
entry: {
9797
'react-redux.production.min': 'src/index.ts',
9898
},
99-
define: {
100-
'process.env.NODE_ENV': JSON.stringify('production'),
99+
env: {
100+
NODE_ENV: 'production'
101101
},
102102
format: ['cjs'],
103103
outDir: './dist/cjs/',

0 commit comments

Comments
 (0)