File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { extname } from 'path'
2
- import { Plugin , PluginOption } from 'vite'
2
+ import { Plugin } from 'vite'
3
3
import { generateImports } from '@vuetify/loader-shared'
4
4
import { parse as parseUrl , URLSearchParams } from 'url'
5
5
@@ -12,7 +12,7 @@ function parseId (id: string) {
12
12
}
13
13
}
14
14
15
- export function importPlugin ( ) : PluginOption {
15
+ export function importPlugin ( ) : Plugin {
16
16
return {
17
17
name : 'vuetify:import' ,
18
18
configResolved ( this : Plugin , config ) {
Original file line number Diff line number Diff line change 1
- import { PluginOption } from 'vite'
1
+ import { Plugin } from 'vite'
2
2
import { Options } from '@vuetify/loader-shared'
3
3
4
4
import { importPlugin } from './importPlugin'
5
5
import { stylesPlugin } from './stylesPlugin'
6
6
7
- export = function vuetify ( _options : Options = { } ) {
7
+ function vuetify ( _options : Options = { } ) : Plugin [ ] {
8
8
const options : Options = {
9
9
autoImport : true ,
10
10
styles : true ,
11
11
stylesTimeout : 10000 ,
12
12
..._options ,
13
13
}
14
14
15
- const plugins : PluginOption [ ] = [ ]
15
+ const plugins : Plugin [ ] = [ ]
16
16
if ( options . autoImport ) {
17
17
plugins . push ( importPlugin ( ) )
18
18
}
@@ -22,3 +22,6 @@ export = function vuetify (_options: Options = {}) {
22
22
23
23
return plugins
24
24
}
25
+
26
+ module . exports = vuetify
27
+ export default vuetify
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as path from 'upath'
3
3
import _debug from 'debug'
4
4
import { cacheDir , writeStyles , resolveVuetifyBase } from '@vuetify/loader-shared'
5
5
6
- import type { PluginOption , ViteDevServer } from 'vite'
6
+ import type { Plugin , ViteDevServer } from 'vite'
7
7
import type { Options } from '@vuetify/loader-shared'
8
8
import type { PluginContext } from 'rollup'
9
9
@@ -16,7 +16,7 @@ function isSubdir (root: string, test: string) {
16
16
17
17
const styleImportRegexp = / ( @ u s e | m e t a \. l o a d - c s s \( ) [ ' " ] ( v u e t i f y (?: \/ l i b ) ? \/ s t y l e s (?: \/ m a i n (?: \. s a s s ) ? ) ? ) [ ' " ] /
18
18
19
- export function stylesPlugin ( options : Options ) : PluginOption {
19
+ export function stylesPlugin ( options : Options ) : Plugin {
20
20
const vuetifyBase = resolveVuetifyBase ( )
21
21
const files = new Set < string > ( )
22
22
You can’t perform that action at this time.
0 commit comments