File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 " env.d.ts"
6262 ],
6363 "scripts" : {
64- "build" : " pnpm clean && tsup " ,
64+ "build" : " pnpm clean && tsdown " ,
6565 "clean" : " rimraf ./dist" ,
66- "dev" : " tsup --watch" ,
66+ "dev" : " tsdown --watch" ,
6767 "dev:pub" : " pnpm dev -- --env.publish" ,
6868 "format" : " node ../../scripts/format-package.mjs" ,
6969 "format:check" : " node ../../scripts/format-package.mjs --check" ,
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'tsup ' ;
1+ import { defineConfig } from 'tsdown ' ;
22
3- import { name , version } from './package.json' ;
3+ import pkgJson from './package.json' with { type : 'json' } ;
44
55export default defineConfig ( overrideOptions => {
66 const isWatch = ! ! overrideOptions . watch ;
@@ -13,15 +13,14 @@ export default defineConfig(overrideOptions => {
1313 types : './src/types/index.ts' ,
1414 } ,
1515 format : [ 'cjs' , 'esm' ] ,
16- bundle : true ,
1716 clean : true ,
1817 minify : false ,
1918 sourcemap : true ,
2019 dts : true ,
2120 onSuccess : shouldPublish ? 'pkglab pub --ping' : undefined ,
2221 define : {
23- PACKAGE_NAME : `"${ name } "` ,
24- PACKAGE_VERSION : `"${ version } "` ,
22+ PACKAGE_NAME : `"${ pkgJson . name } "` ,
23+ PACKAGE_VERSION : `"${ pkgJson . version } "` ,
2524 __DEV__ : `${ isWatch } ` ,
2625 } ,
2726 } ;
You can’t perform that action at this time.
0 commit comments