Open susnux opened 1 year ago
For example it could be fixed by changing https://github.com/vitejs/vite-plugin-vue2/blob/ad7d61e0cc545a6dd2c29954dddf036425971560/src/template.ts#L65
to something like:
(process.env.NODE_ENV === 'production' ? pluginContext.error : pluginContext.warn)(
As I think this warning is converted to an error somewhere more deep inside the compiler-sfc.
When building for development all template compiler warnings are treated as errors instead of warning and will break the build.
Examples for such warnings are:
When having a template like this: