We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 797da60 commit 4218fd9Copy full SHA for 4218fd9
1 file changed
packages/plugin-vue/src/utils/error.ts
@@ -5,26 +5,16 @@ export function createRollupError(
5
id: string,
6
error: CompilerError | SyntaxError
7
): RollupError {
8
- if ('code' in error) {
9
- return {
10
- id,
11
- plugin: 'vue',
12
- message: error.message,
13
- parserError: error,
14
- loc: error.loc
15
- ? {
16
- file: id,
17
- line: error.loc.start.line,
18
- column: error.loc.start.column
19
- }
20
- : undefined
21
22
- } else {
23
24
25
26
27
- parserError: error
+ ;(error as RollupError).id = id
+ ;(error as RollupError).plugin = 'vue'
+
+ if ('code' in error && error.loc) {
+ ;(error as any).loc = {
+ file: id,
+ line: error.loc.start.line,
+ column: error.loc.start.column
28
}
29
+ return error as RollupError
30
0 commit comments