Just diving into Vue using Vite and TypeScript for my project, but running into errors during the build process. Most of them are Object is possibly 'undefined'
, particularly in parts of my template like this:
<input :value="this.$store.state.shareUrl"/>
When I ignore the typecheck and check the built page, it's just a blank page with the error message
TypeError: Cannot read properties of undefined (reading '$store')
. However, everything works fine in the development version. Any advice on how to resolve this issue?