We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff03e3d commit 5f72580Copy full SHA for 5f72580
package.json
@@ -32,6 +32,7 @@
32
},
33
"scripts": {
34
"build": "tsdown",
35
+ "build:prod": "NODE_ENV=prod tsdown",
36
"dev": "tsdown --watch",
37
"lint": "eslint .",
38
"playground": "vite --config playground/vite.config.ts",
tsdown.config.ts
@@ -1,9 +1,12 @@
1
-import { defineConfig } from 'tsdown'
+import { defineConfig } from 'tsdown';
2
3
export default defineConfig([
4
{
5
entry: ['./src/index.ts'],
6
- platform: 'neutral',
+ external: ['react', 'react/jsx-runtime'],
7
+ platform: 'browser',
8
dts: true,
- },
9
-])
+ minify: process.env.NODE_ENV === 'prod',
10
+ sourcemap: true
11
+ }
12
+]);
0 commit comments