Skip to content

Commit f71e3a8

Browse files
committed
Go back to Vite default port (5173) + allows Vite port to be in env variable
1 parent 8574078 commit f71e3a8

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
## [6.0.0-beta.4](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.3...6.0.0-beta.4)
1212
- Add exclude list for optimizeDeps in Vite config
1313
- Add Admin Sprinkle to main.ts
14+
- Go back to Vite default port (`5173`) + allows Vite port to be in env variable
1415

1516
## [6.0.0-beta.3](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.2...6.0.0-beta.3)
1617
- Add 'limax' to optimizeDeps (Prevents "importing binding name 'default' cannot be resolved by star export entries")

vite.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import vue from '@vitejs/plugin-vue'
33
import vueDevTools from 'vite-plugin-vue-devtools'
44
import ViteYaml from '@modyfi/vite-plugin-yaml'
55

6+
// Get vite port from env, default to 3000
7+
const vitePort = parseInt(process.env.VITE_PORT || '5173', 10)
8+
69
// https://vitejs.dev/config/
710
export default defineConfig({
811
plugins: [
@@ -14,8 +17,8 @@ export default defineConfig({
1417
],
1518
server: {
1619
strictPort: true,
17-
port: 3000,
18-
origin: 'http://localhost:3000'
20+
port: vitePort,
21+
origin: `http://localhost:${vitePort}`,
1922
},
2023
root: 'app/assets/',
2124
base: '/assets/',

0 commit comments

Comments
 (0)