Skip to content

Commit 334d47d

Browse files
authored
dx(compiler-sfc): improve error message for missing template and script tag in vue file (#11723)
1 parent d6ccce9 commit 334d47d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler-sfc/src/parse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export function parse(
235235
if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) {
236236
errors.push(
237237
new SyntaxError(
238-
`At least one <template> or <script> is required in a single file component.`,
238+
`At least one <template> or <script> is required in a single file component. ${descriptor.filename}`,
239239
),
240240
)
241241
}

0 commit comments

Comments
 (0)