@@ -11,33 +11,34 @@ import vue from '@vitejs/plugin-vue';
11
11
import vuetify , { transformAssetUrls } from 'vite-plugin-vuetify' ;
12
12
import { viteStaticCopy } from 'vite-plugin-static-copy' ;
13
13
14
+ const scopedPackageName = pkg . name ;
15
+ const packageName = scopedPackageName . split ( '/' ) [ 1 ] ;
16
+
14
17
15
18
const banner = `/**
16
- * @name ${ pkg . name }
19
+ * @name ${ scopedPackageName }
17
20
* @version ${ pkg . version }
18
21
* @description ${ pkg . description }
19
22
* @author ${ pkg . author }
20
23
* @copyright Copyright ${ new Date ( ) . getFullYear ( ) } , WebDevNerdStuff
21
24
* @homepage ${ pkg . homepage }
22
25
* @repository ${ pkg . repository }
23
26
* @license ${ pkg . license } License
24
- */
27
+ */
25
28
` ;
26
29
27
- const pkgName = 'vuetify-resize-drawer' ;
28
-
29
30
export default defineConfig ( {
30
31
publicDir : false ,
31
32
build : {
32
33
lib : {
33
34
entry : './src/plugin/index.ts' ,
34
- name : pkgName ,
35
+ name : packageName ,
35
36
formats : [ 'es' , 'cjs' ] ,
36
- fileName : format => `${ pkgName } .${ format } .js` ,
37
+ fileName : format => `${ packageName } .${ format } .js` ,
37
38
} ,
38
39
rollupOptions : {
39
40
input : {
40
- main : path . resolve ( __dirname , './src/index.ts' )
41
+ main : path . resolve ( __dirname , './src/plugin/ index.ts' )
41
42
} ,
42
43
external : [
43
44
...Object . keys ( pkg . dependencies || { } ) ,
@@ -82,18 +83,29 @@ export default defineConfig({
82
83
} ,
83
84
]
84
85
} ) ,
85
- terser ( ) ,
86
+ terser ( {
87
+ compress : {
88
+ drop_console : [ 'log' ] ,
89
+ } ,
90
+ } ) ,
86
91
] ,
87
92
resolve : {
88
93
alias : {
89
94
'@' : path . resolve ( __dirname , './src' ) ,
90
- '@root' : path . resolve ( __dirname , './' )
95
+ '@components' : path . resolve ( __dirname , './src/plugin/components' ) ,
96
+ '@composables' : path . resolve ( __dirname , './src/plugin/composables' ) ,
97
+ '@plugin' : path . resolve ( __dirname , './src/plugin' ) ,
98
+ '@root' : path . resolve ( __dirname , './' ) ,
99
+ '@slots' : path . resolve ( __dirname , './src/plugin/slots' ) ,
100
+ '@types' : path . resolve ( __dirname , './src/plugin/types' ) ,
101
+ '@utils' : path . resolve ( __dirname , './src/plugin/utils' ) ,
91
102
} ,
92
103
extensions : [
93
104
'.js' ,
94
105
'.json' ,
95
106
'.jsx' ,
96
107
'.mjs' ,
108
+ '.mts' ,
97
109
'.ts' ,
98
110
'.tsx' ,
99
111
'.vue' ,
0 commit comments