alloc / alloc/saus

Add `preload` function to be called in module scope

Đang mở
#63 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
roadmap runtime
Ngôn ngữ chính
TypeScript
Star
38
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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')
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.