Skip to content

Script Setup - Class constructor [class] cannot be invoked without 'new' #6483

Closed
@alexbot89

Description

@alexbot89

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9kMtOw0AMRX/FGiGlldrMvgRE1Q0fwHI26cSBlMxDHqcFRfl3nAelAond+F7Psa97tY8xP3eodqpIlprIkJC7+Gh842Ighh4IaxigpuAgk9bsar1g4kNbprSYuWZR7Kjkp5TdG1/oGSo4KRhdbEtGqQCKY8ccPDzZtrHvD0bdoWt4lbnPScg24PHyM2K1Xhs1fQR4xrYNE0PPENELmb3Q1UbNC25dGWWR4CVdP/abxUhG7WBSRk0yjbVRb8wx7bROtR1vckp5oFctr5w6z43DHJPbHilcEpKAjdrcMLSIZ6Qtoa+QkP5j/mr9wx2xg/GDRLk9qeTAj+n0FdZl1zJMDuyr6hCcK301p7LBJ6bOcqDV+hr0mzl8ARwjrgw=

Steps to reproduce

  1. Open link to SFC Playground
  2. Click the button
  3. An error Class constructor [class] cannot be invoked without 'new' is raised

What is expected?

No error should be visible in <script setup> as the the equivalent behavior is already working in <script>

What is actually happening?

The code is raising an error Class constructor [class] cannot be invoked without 'new' is raised

System Info

No response

Any additional comments?

See Discussion: #6480

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions