You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I attempt to set a port for vite to start on using the vite.config.ts, it is overridden and vite starts on a random free port. This behavior can be tracked directly to the package com.vaadin.base.devserver in the class ViteHandler. Lines 93 and 94 of ViteHandler add the config and lines 95 and 96 following it overwrite the port.
Minimal reproducible example
Create a new vaadin project. In the config.vite.ts set the port by adding:
server {
port: 8137
}
to the configuration. Build an exploded war, place the exploded war in a tomcat instance's webapps folder, observe, in the logs, that vite is started on a port other than 8137.
Expected behavior
Vite should be started on port specified in config.vite.ts is a port is specified.
Actual behavior
A random free port is chosen and that port is used.
Versions:
- Vaadin / Flow version: This dates back to at least Flow 23 and exists still in Flow 24
- Java version: Java 11 for Flow 23, Java 17 for Flow 24
- OS version: Windows 11, Windows 10, MacOS Sonoma 14.1.2
- Browser version (if applicable): N/A
- Application Server (if applicable): Tomcat
- IDE (if applicable): N/A
- Development or production mode: Development
- Project from start.vaadin.com or activated in application: activated in application
The text was updated successfully, but these errors were encountered:
Description of the bug
When I attempt to set a port for vite to start on using the vite.config.ts, it is overridden and vite starts on a random free port. This behavior can be tracked directly to the package com.vaadin.base.devserver in the class ViteHandler. Lines 93 and 94 of ViteHandler add the config and lines 95 and 96 following it overwrite the port.
Minimal reproducible example
Create a new vaadin project. In the config.vite.ts set the port by adding:
to the configuration. Build an exploded war, place the exploded war in a tomcat instance's webapps folder, observe, in the logs, that vite is started on a port other than 8137.
Expected behavior
Vite should be started on port specified in config.vite.ts is a port is specified.
Actual behavior
A random free port is chosen and that port is used.
Versions:
The text was updated successfully, but these errors were encountered: