File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ function isSubdir (root: string, test: string) {
11
11
12
12
const PLUGIN_VIRTUAL_PREFIX = "virtual:"
13
13
const PLUGIN_VIRTUAL_NAME = "plugin-vuetify"
14
+ const VIRTUAL_MODULE_ID = `${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } `
14
15
15
16
export function stylesPlugin ( options : Options ) : Plugin {
16
17
const vuetifyBase = resolveVuetifyBase ( )
@@ -54,7 +55,7 @@ export function stylesPlugin (options: Options): Plugin {
54
55
55
56
tempFiles . set ( file , contents )
56
57
57
- return `${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } :${ file } `
58
+ return `${ VIRTUAL_MODULE_ID } :${ file } `
58
59
}
59
60
} else if ( source . startsWith ( `/${ PLUGIN_VIRTUAL_NAME } :` ) ) {
60
61
return PLUGIN_VIRTUAL_PREFIX + source . slice ( 1 )
@@ -71,8 +72,8 @@ export function stylesPlugin (options: Options): Plugin {
71
72
return ''
72
73
}
73
74
74
- if ( id . startsWith ( `${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } ` ) ) {
75
- const file = new RegExp ( `^${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } :(.*?)(\\?.*)?$` ) . exec ( id ) ! [ 1 ]
75
+ if ( id . startsWith ( `${ VIRTUAL_MODULE_ID } ` ) ) {
76
+ const file = new RegExp ( `^${ VIRTUAL_MODULE_ID } :(.*?)(\\?.*)?$` ) . exec ( id ) ! [ 1 ]
76
77
77
78
return tempFiles . get ( file )
78
79
}
You can’t perform that action at this time.
0 commit comments