Skip to content

Commit

Permalink
fix: fix export default rewrite when at beginning of file
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 27, 2020
1 parent b8901d6 commit 3045112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/server/serverPluginVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export async function parseSFC(
return descriptor
}

const defaultExportRE = /((?:\n|;)\s*)export default/
const defaultExportRE = /((?:^|\n|;)\s*)export default/

async function compileSFCMain(
descriptor: SFCDescriptor,
Expand Down

0 comments on commit 3045112

Please sign in to comment.