File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## UNRELEASED
4+ * Add documentation about running vite in Warden for Laravel ([ wardenenv/warden #846 ] ( https://github.com/wardenenv/warden/issues/846 ) by @bap14 )
5+
36## Version [ 0.14.1] ( https://github.com/wardenenv/warden/tree/0.14.1 ) (2023-07-10)
47[ All Commits] ( https://github.com/wardenenv/warden/compoare/0.14.0..0.14.1 )
58
Original file line number Diff line number Diff line change 1+ # Warden Laravel Environment
2+
3+ ## Laravel + Vite
4+
5+ Starting with Laravel 9.x Vite was added as an asset bundler. Starting with Warden
6+ 0.15.1 you can run the vite development server within the Warden container.
7+
8+ To fully support running the vite development server within the Warden container
9+ you need to adjust your ` vite.config.js ` file:
10+
11+ ``` javascript
12+ export default defineConfig ({
13+ server: {
14+ host: true , // Tell's Vite to listen on all IP addresses; could also use '0.0.0.0'
15+ port: 5173 ,
16+ strictPort: true , // Don't let Vite choose a different port
17+ origin: ` https://vite.<Warden Env Name>.test` , // Replace <Warden Env Name> with your Warden environment name
18+ allowedHosts: [' .<Warden Env Name>.test' ], // Replace <Warden Env Name> with your Warden environment name
19+ cors: {
20+ origin: / https? :\/\/ ([A-Za-z0-9\-\. ] + )? (. + \. test)(?::\d + )? $ / , // Allow any `.test` domain
21+ }
22+ },
23+ // ... The rest of your existing configuration ...
24+ });
25+ ```
You can’t perform that action at this time.
0 commit comments