Level 75
Is the project correctly pointing to public as document root?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i've build using npm run build and host in cPanel but it shows my page location not found.
here is my app.js file code
import { createApp, h } from 'vue'
import { Head, Link, createInertiaApp } from '@inertiajs/vue3'
import Alink from './Shared/Alink.vue';
import ImageProcess from './Shared/ImageProcess.vue';
import Pagination from './Shared/Pagination.vue';
import {layouts} from './Plugins/layouts';
import { notifications,notify } from './Plugins/notification';
// Import the CSS or use your own!
import "vue-toastification/dist/index.css";
import Toast from "vue-toastification";
createInertiaApp({
resolve: async name => {
const parts = name.split('/');
const path = parts.length > 1 ? `./Pages/${parts.join('/')}.vue` : `./Pages/${name}.vue`;
const page = (await import(/* @vite-ignore */path)).default;
if (page.layout === undefined) {
page.layout ??= name.startsWith('backend/')?layouts.AdminLayout:layouts.FrontLayout
}
return page;
},
progress: {
delay: 250,
color: 'red',
includeCSS: true,
showSpinner: true,
},
setup({ el, App, props, plugin }) {
const myApp = createApp({ render: () => h(App, props) });
myApp.config.globalProperties.$route = route
myApp.use(notifications)
myApp.use(Toast)
myApp.use(plugin)
.component('Link', Link)
.component('Head', Head)
.component('Alink', Alink)
.component('ImageProcess',ImageProcess)
.component('Pagination',Pagination)
.mount(el)
},
title:title=>title+'- Doctor Appointment',
})
and this is my vite.config.js file
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
vue(),
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
in my local environment working properly but not worked in cPanel
Please or to participate in this conversation.