setup env pro render
This commit is contained in:
parent
6f2ce912ed
commit
103ed32fbc
1 changed files with 20 additions and 6 deletions
|
|
@ -1,11 +1,25 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
preview: {
|
||||
server: {
|
||||
//dev env
|
||||
host: true,
|
||||
port: process.env.PORT || 4173,
|
||||
allowedHosts: ['myfit-2lu2.onrender.com']
|
||||
port: 5173
|
||||
},
|
||||
preview: {
|
||||
// setup prod env render
|
||||
host: true,
|
||||
port: 10000,
|
||||
allowedHosts: [
|
||||
'myfit.health',
|
||||
'myfit-2lu2.onrender.com'
|
||||
]
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
emptyOutDir: true
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue