Skip to content

Commit

Permalink
chore: 调整导出目录
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Dec 2, 2023
1 parent 11d9b7c commit fc17017
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
24 changes: 7 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,19 @@
},
"engineStrict": true,
"sideEffects": false,
"main": "./dist-cjs/index.cjs",
"module": "./dist-esm/index.mjs",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist-esm/index.mjs",
"require": "./dist-cjs/index.cjs",
"types": "./dist-types/index.d.ts"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
"types": "./dist-types/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist-types/index.d.ts",
"./dist-types/*"
]
}
},
"types": "./dist/index.d.ts",
"files": [
"dist-cjs",
"dist-esm",
"dist-types"
"dist"
],
"keywords": [
"cloudcome",
Expand Down
9 changes: 1 addition & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ import pkg from './package.json';
* @ref https://vitest.dev/
*/
export default defineConfig({
plugins: [
externalizeDeps(),
dts({
outputDir: 'dist-types',
}),
],
plugins: [externalizeDeps(), dts({})],
define: {
PKG_NAME: JSON.stringify(pkg.name),
PKG_VERSION: JSON.stringify(process.env.VITEST ? '0.0.0' : pkg.version),
Expand All @@ -32,13 +27,11 @@ export default defineConfig({
output: [
{
format: 'esm',
dir: 'dist-esm',
entryFileNames: '[name].mjs',
chunkFileNames: '[name].mjs',
},
{
format: 'cjs',
dir: 'dist-cjs',
entryFileNames: '[name].cjs',
chunkFileNames: '[name].cjs',
},
Expand Down

0 comments on commit fc17017

Please sign in to comment.