Just bougth Atlantis template and tried it out the box on a production server.
It is ok if I put the build files into the root folder but on a subfolder, it can't load images located on "/layout/images" for instance.
I updated vite.config.js like so:
Code: Select all
export default defineConfig(() => {
return {
plugins: [vue()],
base: "/my/subfolder/",
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
};
});
Code: Select all
const router = createRouter({
history: createWebHashHistory("/my/subfolder/"),
base: "/my/subfolder/",
routes,
scrollBehavior() {
return { left: 0, top: 0 };
},
});
Navigation is working well, but the system still tried to load assets from the root server folder instead of subfolder.
Any idea of what I am missing?
Thanks in advance.
Regards.