File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,12 @@ export const ROUTES_LAST_LOAD_TIME = {
1616 } ,
1717}
1818
19- // using \0 like recommended in docs makes the module not be parsed by vite
20- // and all of its imports are never refreshed
21- // having /__ makes the file go through import analysis and adds timestamps to the imports
22- export const VIRTUAL_PREFIX = '/__'
19+ // we used to have `/__` because HMR didn't work with `\0` virtual modules
20+ // but it seems to work now, so switching to the official Vite virtual module prefix
21+ export const VIRTUAL_PREFIX = '\0'
2322
2423// allows removing the route block from the code
25- export const ROUTE_BLOCK_ID = ` ${ VIRTUAL_PREFIX } / vue-router/auto/route-block`
24+ export const ROUTE_BLOCK_ID = asVirtualId ( ' vue-router/auto/route-block' )
2625
2726export function getVirtualId ( id : string ) {
2827 return id . startsWith ( VIRTUAL_PREFIX ) ? id . slice ( VIRTUAL_PREFIX . length ) : null
You can’t perform that action at this time.
0 commit comments