This repository was archived by the owner on Jan 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +28
-10
lines changed
Expand file tree Collapse file tree 5 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,4 @@ const shell = require('shelljs')
44
55shell . exec ( 'vue-tsc --noEmit' )
66shell . exec ( 'vite build --config build/vite.config.ts' )
7- shell . exec ( 'cp ./build/index.d.ts ./dist/index.es.d.ts' )
8- shell . exec ( 'cp ./build/index.d.ts ./dist/index.upd.d.ts' )
7+ shell . exec ( 'vue-tsc --declaration --emitDeclarationOnly --p build/tsconfig.json' )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../tsconfig.json" ,
3+ "compilerOptions" : {
4+ "outDir" : " ../dist" ,
5+ },
6+ "files" : [
7+ " ../src/index.ts"
8+ ]
9+ }
Original file line number Diff line number Diff line change @@ -18,7 +18,17 @@ export default defineConfig({
1818 lib : {
1919 entry : resolve ( 'src/index.ts' ) ,
2020 name : 'index' ,
21- fileName : format => `index.${ format } .js` ,
21+ fileName : format => {
22+ let fileEnd = 'js'
23+
24+ if ( format === 'es' ) {
25+ fileEnd = 'mjs'
26+ } else if ( format === 'umd' ) {
27+ fileEnd = 'cjs'
28+ }
29+
30+ return `index.${ fileEnd } `
31+ } ,
2232 } ,
2333
2434 rollupOptions : {
Original file line number Diff line number Diff line change 33 "version" : " 1.2.0-beta.1" ,
44 "scripts" : {
55 "dev" : " vite --config dev/vite.config.ts" ,
6- "build" : " node build/build.js"
6+ "build" : " node build/build.js" ,
7+ "build:types" : " vue-tsc --declaration --emitDeclarationOnly --p ./build/tsconfig.json"
78 },
8- "main" : " ./dist/index.umd.js " ,
9- "module" : " ./dist/index.es.js " ,
9+ "main" : " ./dist/index.cjs " ,
10+ "module" : " ./dist/index.mjs " ,
1011 "exports" : {
1112 "." : {
12- "import" : " ./dist/index.es.js " ,
13- "require" : " ./dist/index.umd.js "
13+ "import" : " ./dist/index.mjs " ,
14+ "require" : " ./dist/index.cjs "
1415 },
1516 "./dist/*" : " ./dist/*" ,
1617 "./package.json" : " ./package.json"
1718 },
18- "types" : " dist/index.upd. d.ts" ,
19+ "types" : " dist/index.d.ts" ,
1920 "keywords" : [
2021 " gitart" ,
2122 " gitart-vue-dialog" ,
You can’t perform that action at this time.
0 commit comments