unplugin/unplugin-turbo-console

Transform error in vue2.7

yandixuan opened this issue · 3 comments

Describe the bug

const { descriptor, errors } = parse(code, {
filename: id,
})
if (errors.length === 0) {
if (descriptor.script) {

The descriptor will be undefined

Reproduction

None

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 5.94 GB / 15.89 GB
  Binaries:
    Node: 20.12.2 - ~\AppData\Local\fnm_multishells\10544_1713747110239\node.EXE
    npm: 10.5.0 - ~\AppData\Local\fnm_multishells\10544_1713747110239\npm.CMD
    pnpm: 8.15.7 - ~\AppData\Local\fnm_multishells\10544_1713747110239\pnpm.CMD
    bun: 1.1.3 - D:\Scoop\shims\bun.EXE
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

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.

Could you provide a minimal Vue SFC file which case this error?

Thanks for your report.
The reason for this problem is vue/compiler-sfc provides different API in 2.7 and 3+ versions.
It should be fixed on v1.8.3 (release)