Description
In the Vue REPL, any edits in the <template>
would result in this error & with failure to autocomplete:
The error is related to this line of code:
https://github.com/vuejs/language-tools/blob/7107d0ac24ccb292f9a876fba85dc835c4439788/packages/typescript-plugin/lib/requests/utils.ts#L43
export function getSelfComponentName(fileName: string) {
+ const baseName = path.basename(fileName);
return capitalize(camelize(baseName.slice(0, baseName.lastIndexOf('.'))));
}
It seems that path-browserify
polyfill is not working properly here.
Patching it to something like this fixed it:
export function getSelfComponentName(fileName: string) {
+ const baseName = fileName.split('/').pop() ?? '';
- const baseName = path.basename(fileName);
return capitalize(camelize(baseName.slice(0, baseName.lastIndexOf('.'))));
}