Subscribe on changes!

Enabling createCompilerError message in production

avatar
Sep 8th 2021

Version

3.2.1

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Is there any way to enable proper error messages in production when using vue.esm-bundler.js?

vue.cjs.prod.js seems to include proper error messages for DOM compiler errors unlike vue.esm-bundler.js.

What is expected?

SyntaxError: Element is missing end tag.

What is actually happening?

SyntaxError: 24

avatar
Sep 8th 2021

That would bloat the production bundle by a LOT. I think what we should probably do is include an error code to message reference in the docs, which can be auto-generated.

For now you can refer to the non-minified code (search for "errorMessages")

avatar
May 15th 2022

It would also help me a lot if const errorMessages could just be an export. I want to report compile errors from production build to server so management users can see error logs.