Laravel Mix + Vue 3 + Typescript - Inconsistent Mix Behavior among different environment compilation
So, I have a project built with Laravel Mix, Vue 3 and Typescript, and it shows different behavior when I'm using the --production compilation of mix. See below:
Mix version: ^6.0.43
Vue Version: ^3.2.31
Typescript Version: ^4.6.2
yarn dev or yarn watch

yarn prod

The part of the code that its throwing the error when i run the --production compilation:
Its a v-for using the Vuelidate error object, which acutally exists and is running fine when compiled.
I even tried to create a dummy object in the script section of type ErrorObject[] | Undefined to see if the compiler would throw the error, but apparently it doesn't, works just fine.

But, after changing the v-for a bit, and instead of using the actual iterated object, i use the index and get it from the array. Then now the mix --production actually works. But there should be no difference between the 2 approaches.

What could be causing it? and also, is there a way for me to inspect the intermidiate .vue.ts files that are generated within compilation time?
Please or to participate in this conversation.