File tree Expand file tree Collapse file tree 3 files changed +41
-21
lines changed Expand file tree Collapse file tree 3 files changed +41
-21
lines changed Original file line number Diff line number Diff line change @@ -62,3 +62,10 @@ AWS_BUCKET=
62
62
AWS_USE_PATH_STYLE_ENDPOINT = false
63
63
64
64
VITE_APP_NAME = " ${ APP_NAME } "
65
+
66
+ WWWGROUP = 1000
67
+ WWWUSER = 1000
68
+
69
+ APP_PORT =
70
+ VITE_PORT = 5173
71
+ VITE_HOST_DOMAIN = primevue-breeze-inertia.localhost
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
12
12
- ' host.docker.internal:host-gateway'
13
13
ports :
14
14
- ' ${APP_PORT:-8000}:80'
15
- - ' ${VITE_PORT:-5173}:5173'
15
+ - ' ${VITE_PORT:-5173}:${VITE_PORT:- 5173} '
16
16
environment :
17
17
WWWUSER : ' ${WWWUSER}'
18
18
LARAVEL_SAIL : 1
Original file line number Diff line number Diff line change 1
- import { defineConfig } from 'vite' ;
1
+ import { defineConfig , loadEnv } from 'vite' ;
2
2
import laravel from 'laravel-vite-plugin' ;
3
3
import vue from '@vitejs/plugin-vue' ;
4
4
5
- export default defineConfig ( {
6
- plugins : [
7
- laravel ( {
8
- input : 'resources/js/app.js' ,
9
- refresh : true ,
10
- } ) ,
11
- vue ( {
12
- template : {
13
- transformAssetUrls : {
14
- base : null ,
15
- includeAbsolute : false ,
5
+ // https://vitejs.dev/config/
6
+ export default ( { mode } ) => {
7
+ const env = loadEnv ( mode , process . cwd ( ) ) ;
8
+ const devPort = parseInt ( env . VITE_PORT ) || 5173 ;
9
+ const hostDomain = env . VITE_HOST_DOMAIN || 'localhost' ;
10
+
11
+ return defineConfig ( {
12
+ plugins : [
13
+ laravel ( {
14
+ input : 'resources/js/app.js' ,
15
+ refresh : true ,
16
+ } ) ,
17
+ vue ( {
18
+ template : {
19
+ transformAssetUrls : {
20
+ base : null ,
21
+ includeAbsolute : false ,
22
+ } ,
16
23
} ,
24
+ } ) ,
25
+ ] ,
26
+ server : {
27
+ port : devPort ,
28
+ hmr : {
29
+ host : hostDomain ,
30
+ } ,
31
+ watch : {
32
+ usePolling : true ,
17
33
} ,
18
- } ) ,
19
- ] ,
20
- server : {
21
- host : 'localhost' ,
22
- watch : {
23
- usePolling : true ,
24
34
} ,
25
- } ,
26
- } ) ;
35
+ preview : {
36
+ port : devPort ,
37
+ } ,
38
+ } ) ;
39
+ } ;
You can’t perform that action at this time.
0 commit comments