File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { extname } from 'path'
2
- import { PluginOption } from 'vite'
2
+ import { Plugin , PluginOption } from 'vite'
3
3
import { generateImports } from '@vuetify/loader-shared'
4
4
import { parse as parseUrl , URLSearchParams } from 'url'
5
5
@@ -15,6 +15,11 @@ function parseId (id: string) {
15
15
export function importPlugin ( ) : PluginOption {
16
16
return {
17
17
name : 'vuetify:import' ,
18
+ configResolved ( this : Plugin , config ) {
19
+ if ( config . plugins . indexOf ( this ) < config . plugins . findIndex ( plugin => plugin . name === 'vite:vue' ) ) {
20
+ throw new Error ( 'Vuetify plugin must be loaded after the vue plugin' )
21
+ }
22
+ } ,
18
23
async transform ( code , id ) {
19
24
const { query, path } = parseId ( id )
20
25
if ( extname ( path ) === '.vue' && ! query ) {
You can’t perform that action at this time.
0 commit comments