Commit b7026ad
authored
perf: lazily import resolveConfig (#190)
### TL;DR
Dynamically import `resolveConfig` in the `resolveUniversalViteConfig` function instead of importing it at the top level.
`resolveConfig` imports `rolldown-vite` which takes nearly 100ms. It's not actually used if cache is hit. Lazily importing it improves the startup time.
### Before:

### After:
1 parent 04c05d7 commit b7026ad
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
0 commit comments