I have upgraded my Laravel 5.8 to Laravel 9 and now I am using ViteJS instead of laravel-mix.
My Vue components now looks there are obsolete some how:
Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
19:24:27 [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
Plugin: vite:import-analysis
File: /Users/marcellopato/Documents/Sites/wb9/resources/js/components/UploadForm.vue:6:101
4 | <input type="file" name="image" class="" @change="GetImage" accept="image/*">
5 | <img :src="avatar" alt="Imagem" class="drop">
6 | <a href="#" v-if="loaded" class="btn btn-success m-t-10" @click.stop="Upload">Enviar</a>
| ^
7 | <a href="#" v-if="loaded" class="btn btn-danger m-t-10" @click.stop="Cancel">Cancelar</a>
8 | <span class="custom-file-control text-muted"><slot></slot> CPF: <span v-text="cpf"></span></span>
at formatError (file:///Users/marcellopato/Documents/Sites/wb9/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41235:46)
at TransformContext.error (file:///Users/marcellopato/Documents/Sites/wb9/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41231:19)
at TransformContext.transform (file:///Users/marcellopato/Documents/Sites/wb9/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:39475:22)
at async Object.transform (file:///Users/marcellopato/Documents/Sites/wb9/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41506:30)
at async loadAndTransform (file:///Users/marcellopato/Documents/Sites/wb9/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:39313:29)
I did install the @vitejs/plugin-vue plugin and imported on app.js file like so:
import '@vitejs/plugin-vue'; but looks like it is not working. Should it re-wirte my .vue files?
Or maybe I should re-write by myself? There is a guide to follow?