Closed mcrampon closed 9 months ago
When using unplugin-vue with esbuild, I get error messages that I can't really use.
From what I could diagnose, this comes from this line: https://github.com/unplugin/unplugin-vue/blob/d17f4dcc3bc511d0deb43dd0d372fffdb21fa0b6/src/core/template.ts#L106
I would guess that esbuild doesn't really do anything with objects here and would rather get a string
unplugin-vue 5.0.2 + esbuild 0.20.0
Example of a component that will produce such an error:
<template> <MyComponent v-model="myProp" /> </template> <script> export default { props: { myProp: { type: String, required: true } } }; </script>
The error message should be something like:
SyntaxError: v-model cannot be used on a prop, because local prop bindings are not writable. Use a v-bind binding combined with a v-on listener that emits update:x event instead.
System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics Memory: 1.23 GB / 11.50 GB Container: Yes Shell: 5.9 - /usr/bin/zsh Binaries: Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v18.19.0/bin/yarn npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm Browsers: Chrome: 120.0.6099.129
yarn
Fixed!
Try unplugin-vue@5.0.3
unplugin-vue@5.0.3
Describe the bug
When using unplugin-vue with esbuild, I get error messages that I can't really use.
From what I could diagnose, this comes from this line: https://github.com/unplugin/unplugin-vue/blob/d17f4dcc3bc511d0deb43dd0d372fffdb21fa0b6/src/core/template.ts#L106
I would guess that esbuild doesn't really do anything with objects here and would rather get a string
Reproduction
unplugin-vue 5.0.2 + esbuild 0.20.0
Example of a component that will produce such an error:
The error message should be something like:
System Info
Used Package Manager
yarn
Validations