Subscribe on changes!

Get class constructors must be invoked with 'new' when instantiating new object in @click handler in PROD, but working in DEV

avatar
Jan 31st 2023

Vue version

3.2.45

Link to minimal reproduction

Exception in PROD

Same code working in DEV

Steps to reproduce

Click the button in the reproduction example. In DEV mode 'hello' is logged to the console. In PROD mode there is an exception.

What is expected?

Expect to see 'hello' logged or a meaningful exception message and consistent behaviour between DEV and PROD mode

What is actually happening?

Get class constructors must be invoked with 'new' exception in PROD, working fine in DEV mode

System Info

No response

Any additional comments?

No response