mirror of https://github.com/vuejs/core.git
dx(compiler-sfc): improve error message for missing template and script tag in vue file (#11723)
This commit is contained in:
parent
d6ccce9049
commit
334d47ddf3
|
@ -235,7 +235,7 @@ export function parse(
|
||||||
if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) {
|
if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) {
|
||||||
errors.push(
|
errors.push(
|
||||||
new SyntaxError(
|
new SyntaxError(
|
||||||
`At least one <template> or <script> is required in a single file component.`,
|
`At least one <template> or <script> is required in a single file component. ${descriptor.filename}`,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue