Client setup seam: run app code before the generated entry's hydrate (start.clientSetup)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, vite
- Área
- build-system, frontend
Línea de trabajo
This is a design decision, not a ready-to-code task: the issue asks for a start.clientSetup option or a <ClientEntry /> component, and the maintainers have not chosen between them. Start with the code that generates the client entry and the existing start.instrument server hook, which the issue uses as the model. Done means a maintainer agrees on the API and the generated entry runs the setup module before hydrate.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
@solidjs/vite-plugin 3.0.0-next.50, solid-js 2.0.0-rc.15.
The generated client entry calls hydrate straight away, and there is no place for app code that has to run in the browser before hydration. Our real cases:
- Installing a server-function transport wrapper that detects a response from another build (version skew) and reloads. It must be in place before the first render fires the page's reads.
- A request-header hook on that transport, for example a tenant selector header the server functions need.
- Registering the
vite:preloadErrorlistener before any lazy route chunk loads. - Reading a third-party global that a classic
<script>in<body>defines (Telegram'stelegram-web-app.js). Today the generated entry is anasyncmodule in<head>, so its order relative to that script is not guaranteed. #411 / solidjs/solid#4002 fixed hydration itself here, but not setup code that reads globals.
Because of this we keep authored entry-client.tsx / entry-server.tsx pairs only to run three lines before hydrate. That means we also carry the Document + hydrate(…, document) boilerplate that the generated entries would give us.
Suggestion (either works for us):
start.clientSetup: './src/client-setup.ts'. The generated client entry doesawait import(setup)(or a static import placed first) beforehydrate. This mirrorsstart.instrumenton the server.- A
<ClientEntry />component that the document places where it wants (for example at the end of<body>), with the setup module option above.
Option 1 alone would let us delete both authored entries.
- Lenguaje dominante
- TypeScript
- Estrellas
- 522
- Forks
- 73
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 34
Preparar el entorno
- 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 solidjs/solid-vite-plugin
-
Test environment detection doesn't consider Vitest workspacesPosiblemente ocupada @carloitaben la tomó hace 54 días. Abierto1.x
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
solidjs/solid-vite-plugin#205 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
[3.0.0-next.50 / next] SSR build: the $$moduleUrl export added to a Worker main module stops workerd from startingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
solidjs/solid-vite-plugin#420 ·
Los mantenedores suelen responder en 1 día
-
start.node: node.js imports node:http before start.instrument runs, so HTTP instrumentation misses the serverPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 1-2 días Aptitud para principiantes 30/100
solidjs/solid-vite-plugin#418 ·
Los mantenedores suelen responder en 1 día
-
Dev manifest bridge keeps stale CSS after an editPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 34/100
solidjs/solid-vite-plugin#415 ·
Los mantenedores suelen responder en 1 día
-
Dev manifest loses lazy CSS when imported before HTTP startupPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
solidjs/solid-vite-plugin#414 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/solid-vite-plugin
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melgarafael/DeskcommCRM#3000 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
callstackincubator/simlock#639 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
aws/agentcore-cli#2606 ·
Los mantenedores suelen responder en 1 día
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 7 días
-
ai-driven-qa bug Cosmetic
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día