I’m attempting to deploy my app to a server using vite(vue). I saw this was asked here, but it doesn’t have an answer.
My vite.config.js is:
export default defineConfig({
base: "./",
plugins: [vue(), vueJsx(), vueDevTools()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});
I execute yarn build.
which builds my package: "build": "vite build",
I then push all changes.
The error in my client browser I get is:
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
I assume this has to do with my index.html module found here:
<script type="module" src="src/main.js"></script>
This file is located in src/main.js path.
Any idea what I’m doing wrong? If you need more details as far as the file structures please let me know. Thank you!