File tree 7 files changed +1338
-1316
lines changed
7 files changed +1338
-1316
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,7 @@ pnpm-debug.log*
21
21
* .njsproj
22
22
* .sln
23
23
* .sw ?
24
+
25
+ package /* .d.ts
26
+
27
+ src /* .d.ts
Original file line number Diff line number Diff line change 7
7
"serve" : " vue-cli-service serve" ,
8
8
"build" : " vue-cli-service build" ,
9
9
"lint" : " vue-cli-service lint" ,
10
- "lib" : " vue-cli-service build --target lib --name vue3-tabs-chrome ./package/index.ts"
10
+ "moveTs" : " scp ./package/index.d.ts ./dist/vue3-tabs-chrome.common.d.ts && scp ./package/vue3-tabs-chrome.vue.d.ts ./dist/vue3-tabs-chrome.vue.d.ts" ,
11
+ "lib" : " vue-cli-service build --target lib --name vue3-tabs-chrome ./package/index.ts && npm run moveTs"
11
12
},
12
13
"files" : [
13
14
" dist/**.*"
Original file line number Diff line number Diff line change 1
1
import { App , Plugin } from 'vue'
2
- import Vue3TabsChrome from './vue3-tabs-chrome.vue'
2
+ import Vue3TabsChrome , { Tab } from './vue3-tabs-chrome.vue'
3
3
import './theme-dark.less'
4
4
5
5
const install = ( app : App ) => {
@@ -8,6 +8,6 @@ const install = (app: App) => {
8
8
9
9
Vue3TabsChrome . install = install
10
10
11
- export { Vue3TabsChrome }
11
+ export { Vue3TabsChrome , Tab }
12
12
13
13
export default Vue3TabsChrome as unknown as Plugin
Original file line number Diff line number Diff line change 1
- <script >
1
+ <script lang="ts" >
2
2
import { defineComponent } from ' vue'
3
3
4
4
export default defineComponent ({
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
+ "declaration" : true ,
3
4
"target" : " esnext" ,
4
5
"module" : " esnext" ,
5
6
"strict" : true ,
38
39
"exclude" : [
39
40
" node_modules"
40
41
]
41
- }
42
+ }
Original file line number Diff line number Diff line change @@ -6,5 +6,21 @@ module.exports = {
6
6
productionSourceMap : false ,
7
7
publicPath : process . env . NODE_ENV === 'production'
8
8
? '/vue3-tabs-chrome/'
9
- : '/'
9
+ : '/' ,
10
+ chainWebpack : config => {
11
+ if ( process . env . NODE_ENV === 'production' ) {
12
+ config . module . rule ( 'ts' ) . uses . delete ( 'cache-loader' ) ;
13
+ config . module
14
+ . rule ( 'ts' )
15
+ . use ( 'ts-loader' )
16
+ . loader ( 'ts-loader' )
17
+ . tap ( options => ( {
18
+ ...options ,
19
+ transpileOnly : false ,
20
+ happyPackMode : false
21
+ } ) ) ;
22
+ config . output . libraryExport = 'default' ;
23
+ }
24
+ } ,
25
+ parallel : false
10
26
}
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments