File tree 2 files changed +10
-2
lines changed
packages/vite/src/node/optimizer
playground/multiple-entrypoints/__tests__
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -161,10 +161,16 @@ async function createDepsOptimizer(
161
161
let firstRunCalled = ! ! cachedMetadata
162
162
163
163
let postScanOptimizationResult : Promise < DepOptimizationResult > | undefined
164
+ let discoverProjectDependenciesPromise :
165
+ | Promise < Record < string , string > >
166
+ | undefined
164
167
165
168
let optimizingNewDeps : Promise < DepOptimizationResult > | undefined
166
169
async function close ( ) {
167
170
closed = true
171
+ await discoverProjectDependenciesPromise ?. catch ( ( ) => {
172
+ /* ignore error for scanner because it's not important */
173
+ } )
168
174
await postScanOptimizationResult
169
175
await optimizingNewDeps
170
176
}
@@ -202,7 +208,9 @@ async function createDepsOptimizer(
202
208
try {
203
209
debug ( colors . green ( `scanning for dependencies...` ) )
204
210
205
- const deps = await discoverProjectDependencies ( config )
211
+ discoverProjectDependenciesPromise =
212
+ discoverProjectDependencies ( config )
213
+ const deps = await discoverProjectDependenciesPromise
206
214
207
215
debug (
208
216
colors . green (
Original file line number Diff line number Diff line change 1
1
import { expect , test } from 'vitest'
2
2
import { getColor , page , untilUpdated } from '~utils'
3
3
4
- test . skip ( 'should have css applied on second dynamic import' , async ( ) => {
4
+ test ( 'should have css applied on second dynamic import' , async ( ) => {
5
5
await untilUpdated ( ( ) => page . textContent ( '.content' ) , 'Initial' , true )
6
6
await page . click ( '.b' )
7
7
You can’t perform that action at this time.
0 commit comments