vue-parser
vue-parser copied to clipboard
Nondescriptive error when self-closing <script /> tag is encountered
While it is true that a self-closing <script src="./path/to/file.js" />
tag is not valid HTML, it would be nice if there could be a more descriptive error when one is encountered. Currently, the following error is thrown when a self-closing script tag is encountered:
var nodeContent = input.substring(node.__location.startTag.endOffset, node.__location.endTag.startOffset);
^
TypeError: Cannot read property 'startOffset' of undefined
at padContent (node_modules\vue-parser\lib\index.js:34:102)
at Object.parse (node_modules\vue-parser\lib\index.js:19:22)
at Object.host.getSourceFile (node_modules\fork-ts-checker-webpack-plugin\lib\VueProgram.js:110:40)
at findSourceFile (node_modules\typescript\lib\typescript.js:79645:29)