Skip to content

Commit

Permalink
chore: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Mar 14, 2024
1 parent 0dff1ee commit 960c250
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/definePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export function definePageTransform({
const isExtractingDefinePage = MACRO_DEFINE_PAGE_QUERY.test(id)

if (!code.includes(MACRO_DEFINE_PAGE)) {
// avoid having an invalid module that is just empty
// https://github.com/posva/unplugin-vue-router/issues/338
return isExtractingDefinePage ? 'export default {}' : undefined
}

Expand Down

0 comments on commit 960c250

Please sign in to comment.