Skip to content

Commit

Permalink
chore: 优化构建产出
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Nov 9, 2023
1 parent 93f7296 commit 090c3c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
"test:coverage": "vitest run --coverage"
},
"sideEffects": false,
"main": "./dist-cjs/index.cjs",
"module": "./dist-esm/index.mjs",
"types": "./dist-types/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"dist-cjs",
"dist-esm",
"dist-types"
"dist"
],
"keywords": [
"cloudcome",
Expand Down
6 changes: 3 additions & 3 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
plugins: [
externalizeDeps(),
dts({
outDir: 'dist-types',
outDir: 'dist',
entryRoot: 'src',
}),
],
Expand All @@ -33,13 +33,13 @@ export default defineConfig({
output: [
{
format: 'esm',
dir: 'dist-esm',
dir: 'dist',
entryFileNames: '[name].mjs',
chunkFileNames: '[name].mjs',
},
{
format: 'cjs',
dir: 'dist-cjs',
dir: 'dist',
entryFileNames: '[name].cjs',
chunkFileNames: '[name].cjs',
},
Expand Down

0 comments on commit 090c3c9

Please sign in to comment.