Have you considered making a fresh laravel 10 app and migrating your M-V-C over? I did this recently and it was actually faster than trying to upgrade, just suggestion.
Or use laravel shift.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello everyone, I have spent a few days trying to make my application work with vite. I have follow everything the documentation says but I just cant get it to work. The app is build with laravel 9 vue 2 and it is dockerized. I get a message in the console with: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at... and a blank page. I am loosing my mind and I have no clue what to do. please help!
my vite.config
import { defineConfig } from 'vite';
import fs from 'fs';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue2';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/assets/dashboard/js/app.js',
'resources/assets/dashboard/scss/vendors.css',
'resources/assets/dashboard/scss/custom.css',
'resources/assets/dashboard/scss/components.scss',
],
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
server: {
host: 'localhost',
https: {
key: fs.readFileSync('./Docker/certs/talentu.local.key'),
cert: fs.readFileSync('./Docker/certs/talentu.local.crt'),
},
hmr: {
host: 'localhost',
},
},
});
my docker-compose
version: "3"
services:
talentu-proxy:
image: jwilder/nginx-proxy
ports:
- "8080:80"
- "443:443"
- "${VITE_PORT:-5173}:${VITE_PORT:-5173}"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./Docker/jwilder-nginx/client_max_body_size.conf:/etc/nginx/conf.d/client_max_body_size.conf
- ./Docker/certs:/etc/nginx/certs
container_name: talentu_proxy
talentu-db:
image: mysql:5.7
volumes:
- ./Docker/mysql/my.cnf:/etc/my.cnf
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: "laravel"
MYSQL_USER: "laravel"
MYSQL_PASSWORD: "laravel"
MYSQL_ROOT_PASSWORD: "laravel"
depends_on:
- talentu-proxy
ports:
- 42333:3306
container_name: db.candidatos.talentu.local
redis:
image: redis
depends_on:
- talentu-proxy
ports:
- 6379:6379
container_name: redis.talentu.local
talentu-candidatos:
build: .
volumes:
- .:/var/www/html:delegated
- ./Docker/php/xdebug.ini:/etc/php/8.0/cli/conf.d/20-xdebug.ini:delegated
- ./Docker/php/php.ini:/etc/php/8.0/fpm/php.ini:delegated
environment:
- VIRTUAL_HOST=*.talentu.local
- VIRTUAL_PORT=443
- VIRTUAL_PROTO=https
depends_on:
- talentu-db
command: ["bash", "/var/www/html/Docker/bootstrap.sh"]
container_name: candidatos.talentu.local
networks:
default:
external:
name: talentu-network
Please help, I have no idea what is it that im missing. Tahnk you
Please or to participate in this conversation.