Skip to content

Commit

Permalink
build(patch): update build tool to unbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
syfxlin committed Sep 15, 2023
1 parent 433c1d7 commit 4b6b141
Show file tree
Hide file tree
Showing 4 changed files with 614 additions and 236 deletions.
11 changes: 11 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineBuildConfig } from "unbuild";

export default defineBuildConfig({
entries: ["./src/index.ts"],
externals: ["react"],
clean: true,
declaration: true,
rollup: {
emitCJS: true,
},
});
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
},
"scripts": {
"dev": "vite",
"build": "tsup",
"watch": "tsup --watch"
"build": "unbuild",
"watch": "unbuild --stub"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
Expand Down Expand Up @@ -64,8 +64,8 @@
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.9"
}
}
Loading

0 comments on commit 4b6b141

Please sign in to comment.