laravel / vite-plugin

Laravel plugin for Vite.
MIT License
799 stars 151 forks source link

Ignores host config #107

Closed quantumwebco closed 2 years ago

quantumwebco commented 2 years ago

Description:

Setting host in config gets ignored, setting host on cli throws exception

Brand new Laravel install sail up npx @preset/cli apply laravel:inertia

as per the docs in config/vite.php 'url' => env('DEV_SERVER_URL', 'http://0.0.0.0:5173'), in vite.config.js server: {host: '0.0.0.0'}, in .env DEV_SERVER_URL=http://0.0.0.0:3000 in docker-compose.yml - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'

sail npm run dev ➜ Local: http://localhost:3000/ Blank screen

CTRL + C

sail npm run dev --host 0.0.0.0 ➜ Local: http://localhost:5173/ Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

Throws exception The manifest could not be found.

Been trying all sorts for hours. I guess this isn't compatible with Sail yet??

quantumwebco commented 2 years ago

Setting DEV_SERVER_URL=http://localhost:5173 which is the default seems to work fine I must have just been getting confused and mismatched all the config lol

jessarcher commented 2 years ago

This is the wrong repo, you're after https://github.com/innocenzi/laravel-vite