Skip to content

Commit

Permalink
fix: use unbuild instead due to bun #10607
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Apr 30, 2024
1 parent 4fc0def commit 759dcb9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
3 changes: 2 additions & 1 deletion benchmark/cn-lorem-ipsum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-ignore
import cnLorem from '../dist/index';
import cnLorem from '../dist/index.mjs';

// @ts-ignore
cnLorem.paragraph({ len: 1e7 });
13 changes: 13 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineBuildConfig } from 'unbuild';

export default defineBuildConfig({
entries: ['src/index'],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
esbuild: {
minify: true,
},
},
});
8 changes: 0 additions & 8 deletions build.ts

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "cn-lorem-ipsum",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "fast chinese lorem-ipsum & names generator",
"scripts": {
"build": "bun run build.ts",
"prepublishOnly": "bun run build",
"build": "unbuild",
"prepublishOnly": "unbuild",
"typecheck": "tsc --noEmit",
"biome:fix": "biome check --apply ."
},
Expand All @@ -24,7 +24,7 @@
"devDependencies": {
"@biomejs/biome": "1.7.1",
"@types/bun": "^1.0.0",
"bun-plugin-dts": "^0.2.1",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"unbuild": "^2.0.0"
}
}

0 comments on commit 759dcb9

Please sign in to comment.