Add `preload` function to be called in module scope
Abierto
roadmap
runtime
- Lenguaje dominante
- TypeScript
- Estrellas
- 38
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The goal is to allow APIs like `React.lazy` to be transformed into SSR friendly code. The transformation itself would be done by a Saus plugin. The `preload` function mentioned in this issue's title will come in handy for injecting `` tags for the rewritten dynamic imports.
```ts
// Before
const Foo = React.lazy(() => import('./Foo'))
// After (SSR only)
import { preload } from 'saus/preload'
import Foo from './Foo'
preload('/src/Foo')
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.