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) {
1111
1212const PLUGIN_VIRTUAL_PREFIX = "virtual:"
1313const PLUGIN_VIRTUAL_NAME = "plugin-vuetify"
14+ const VIRTUAL_MODULE_ID = `${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } `
1415
1516export function stylesPlugin ( options : Options ) : Plugin {
1617 const vuetifyBase = resolveVuetifyBase ( )
@@ -54,7 +55,7 @@ export function stylesPlugin (options: Options): Plugin {
5455
5556 tempFiles . set ( file , contents )
5657
57- return `${ PLUGIN_VIRTUAL_PREFIX } ${ PLUGIN_VIRTUAL_NAME } :${ file } `
58+ return `${ VIRTUAL_MODULE_ID } :${ file } `
5859 }
5960 } else if ( source . startsWith ( `/${ PLUGIN_VIRTUAL_NAME } :` ) ) {
6061 return PLUGIN_VIRTUAL_PREFIX + source . slice ( 1 )
@@ -71,8 +72,8 @@ export function stylesPlugin (options: Options): Plugin {
7172 return ''
7273 }
7374
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 ]
7677
7778 return tempFiles . get ( file )
7879 }
You can’t perform that action at this time.
0 commit comments