serve does not work with multi-server
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #4728 de @info-arnav — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- cli
Línea de trabajo
Empieza por packages/serve/src/startDevServer.ts y la reproducción en test/serve/basic/multi-dev-server.config.js. Ejecuta el caso de múltiples servidores sin puertos explícitos y, después, inspecciona cómo la CLI valida las opciones de devServer. Se considera terminado cuando las configuraciones con publicPaths únicos se puedan servir desde un solo puerto sin el error de puerto único, con cobertura de este comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
We're having issues updating to webpack 5 and webpack serve. Our project is divided into multiple webpack configurations. Say for example we have one configuration for a SPA /login/ , /portal/, our application for end users and /admin/ for our administrators. We do this, so that every SPA when hosted belongs into its own folder and we can easily make sure that critical code like in our /admin/ SPA is never served outside of intranet. Now to test locally, we use webpack-dev-server's multi project configuration. Every SPA is identifiable by an unique publicPath (e. g. /admin). This worked beautifully with webpack-dev-server, but with webpack 5 and webpack-cli this is no longer the case. We use multiple webpack configurations to test our
We used to use webpack-dev-server to start our development server directly, however as I understand that is no longer working with webpack 5.
What is the current behavior?
Webpack-cli outputs a an error message:
Error: Unique ports must be specified for each devServer option inyour webpack configuration. Alternatively, run only 1 devServer config using the--config-name flag to specify your desired config.
at Object.startDevServer [as default]
To Reproduce
Steps to reproduce the behavior:
https://github.com/webpack/webpack-cli/blob/master/test/serve/basic/multi-dev-server.config.js without the explicit ports does show my use case perfectly.
Expected behavior
If publicPaths for configurations are unique, webpack serve should be able to serve them from the same port.
Screenshots
Please paste the results of webpack-cli info here, and mention other relevant information
Additional context
Maybe this was first introduced with https://github.com/webpack/webpack-cli/pull/1649 A possible solution might be to change https://github.com/webpack/webpack-cli/blob/ec3baa84479984921e40cd7113e4ab6a14723a7a/packages/serve/src/startDevServer.ts#L14 to add an additional check for unique publicPaths if ports are not unique.
Thanks a lot,
Christian
- Lenguaje dominante
- JavaScript
- Estrellas
- 2.6k
- Forks
- 680
- Merge medio
- 15 h 13 min
- PR fusionados (30 d)
- 9
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webpack/webpack-cli
-
Feature Request
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
webpack/webpack-cli#3436 · 14 comentarios · 9 reacciones ·
Los mantenedores suelen responder en 1 día
-
[Feature]: Watch for webpack config changes in watch modeQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoenhancement Feature Up for planning
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
webpack/webpack-cli#15 · 42 comentarios · 48 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de webpack/webpack-cli
Issues similares
-
[quality] useFocusTrap's Shift+Tab wrap and non-Tab/non-Escape key arms are never driven end to endPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[aw] Upgrade availableAbiertoagentic-workflows
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
githubnext/gh-aw-workshop#4220 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
JuliusBrussee/caveman#1189 ·
Los mantenedores suelen responder en 1 día
-
priority:low ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenHands/extensions#738 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
invoiceninja/invoiceninja#13320 ·
Los mantenedores suelen responder en 1 día