Skip to content

Commit

Permalink
feat: compat to vue2.7 (hannoeru#238)
Browse files Browse the repository at this point in the history
Co-authored-by: hanlee <me@hanlee.co>
  • Loading branch information
zouhangwithsweet and hannoeru authored Jun 17, 2022
1 parent f8a998c commit dca799d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"type-check": "tsc --noEmit"
},
"peerDependencies": {
"@vue/compiler-sfc": "^3.0.0",
"@vue/compiler-sfc": "^2.0.0 || ^3.0.0",
"vite": "^2.0.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion src/customBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function getRouteBlock(path: string, options: ResolvedOptions) {
const content = fs.readFileSync(path, 'utf8')

const parsedSFC = await parseSFC(content)
const blockStr = parsedSFC.customBlocks.find(b => b.type === 'route')
const blockStr = parsedSFC?.customBlocks.find(b => b.type === 'route')

const parsedJSX = parseJSX(content)

Expand Down

0 comments on commit dca799d

Please sign in to comment.