File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,11 @@ class CheckEsVersionPlugin {
35
35
}
36
36
37
37
buildError ( { err, source, filename } ) {
38
- const { line, column } = err . loc ;
39
- const sourceLine = source . split ( / \n / ) [ line - 1 ] ;
40
- const marker = new Array ( column + 1 ) . fill ( ' ' ) ;
41
- marker [ column ] = '^' ;
42
-
43
- return new SyntaxError ( `Invalid ES${ this . esVersion } at ${ filename } : ${ err } \n${ sourceLine } \n${ marker } ` )
38
+ return new SyntaxError ( `Invalid ES${ this . esVersion } at ${ filename } : ${ err } ` ) ;
44
39
}
45
40
}
46
41
47
- module . exports = CheckEsVersionPlugin ;
42
+ module . exports = CheckEsVersionPlugin ; // not recommended
43
+
44
+ // `const { CheckEsVersionPlugin } = require("@bitjourney/check-es-version-webpack-plugin")` is recommended:
48
45
module . exports . CheckEsVersionPlugin = CheckEsVersionPlugin ;
You can’t perform that action at this time.
0 commit comments