unplugin/unplugin-vue

Non-descriptive errors with esbuild

mcrampon opened this issue · 2 comments

Describe the bug

When using unplugin-vue with esbuild, I get error messages that I can't really use.

image

From what I could diagnose, this comes from this line:

: createRollupError(filename, error),

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:

<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 Info

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

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
sxzz commented

Fixed!

sxzz commented

Try unplugin-vue@5.0.3