File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 141141 "@vue/devtools-api" : " ^8.1.5" ,
142142 "ast-walker-scope" : " ^0.9.0" ,
143143 "chokidar" : " ^5.0.0" ,
144- "json5 " : " ^2 .2.3 " ,
144+ "confbox " : " ^0 .2.4 " ,
145145 "local-pkg" : " ^1.2.1" ,
146146 "magic-string" : " ^0.30.21" ,
147147 "mlly" : " ^1.8.2" ,
152152 "scule" : " ^1.3.0" ,
153153 "tinyglobby" : " ^0.2.17" ,
154154 "unplugin" : " ^3.3.0" ,
155- "unplugin-utils" : " ^0.3.2" ,
156- "yaml" : " ^2.9.0"
155+ "unplugin-utils" : " ^0.3.2"
157156 },
158157 "devDependencies" : {
159158 "@babel/types" : " ^8.0.0" ,
Original file line number Diff line number Diff line change 11import type { SFCBlock } from '@vue/compiler-sfc'
22import { parse as parseSFC } from '@vue/compiler-sfc'
33import type { ResolvedOptions } from '../options'
4- import JSON5 from 'json5'
5- import { parse as parseYaml } from 'yaml'
4+ import { parseJSON5 } from 'confbox/ json5'
5+ import { parseYAML } from 'confbox/ yaml'
66import { diagnostics } from '../diagnostics'
77import type { DefinePageQueryParamOptions } from '../../experimental/runtime'
88import type { RouteRecordRaw } from '../../types'
@@ -60,7 +60,7 @@ function parseCustomBlock(
6060
6161 if ( lang === 'json5' ) {
6262 try {
63- return JSON5 . parse ( block . content )
63+ return parseJSON5 ( block . content )
6464 } catch ( err : any ) {
6565 diagnostics . VUE_ROUTER_B0012 ( {
6666 type : block . type ,
@@ -80,7 +80,7 @@ function parseCustomBlock(
8080 }
8181 } else if ( lang === 'yaml' || lang === 'yml' ) {
8282 try {
83- return parseYaml ( block . content )
83+ return parseYAML ( block . content )
8484 } catch ( err : any ) {
8585 diagnostics . VUE_ROUTER_B0014 ( {
8686 type : block . type ,
You can’t perform that action at this time.
0 commit comments