Skip to content

Commit 1769143

Browse files
committed
chore: format vite config
1 parent bc882cd commit 1769143

File tree

5 files changed

+470
-18
lines changed

5 files changed

+470
-18
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"turbo": "^2.5.4",
4545
"typescript": "^5.8.3",
4646
"vite": "^6.3.5",
47+
"vite-plugin-dts": "^3.8.1",
4748
"vitest": "^3.1.4"
4849
},
4950
"standard-version": {

packages/nutils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"node": ">=22.16.0"
2424
},
2525
"scripts": {
26-
"build": "tsc && tsup",
27-
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
26+
"build": "tsc && vite build",
27+
"watch": "vite build --watch --mode development",
2828
"test": "vitest --run",
2929
"prerelease": "standard-version --skip.changelog --prerelease",
3030
"release": "standard-version --release-as",

packages/nutils/tsup.config.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/nutils/vite.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig } from 'vite'
2+
import dts from 'vite-plugin-dts'
3+
4+
export default defineConfig({
5+
build: {
6+
lib: {
7+
entry: 'src/index.ts',
8+
formats: ['es'],
9+
fileName: () => 'index.js'
10+
},
11+
outDir: 'build',
12+
target: 'es2015',
13+
sourcemap: true,
14+
minify: true,
15+
rollupOptions: {
16+
external: ['is-url-superb', 'mem', 'normalize-url', '@texonom/ntypes', 'p-queue']
17+
}
18+
},
19+
plugins: [dts({ tsconfigPath: 'tsconfig.json', outDir: 'build' })]
20+
})

0 commit comments

Comments
 (0)