@@ -28,25 +28,30 @@ export const generateOutputTargets = async (
28
28
invalidateRollupCaches ( compilerCtx ) ;
29
29
30
30
await Promise . all ( [
31
- outputCopy ( config , compilerCtx , buildCtx ) ,
32
31
outputCollection ( config , compilerCtx , buildCtx , changedModuleFiles ) ,
33
32
outputCustomElements ( config , compilerCtx , buildCtx ) ,
34
33
outputHydrateScript ( config , compilerCtx , buildCtx ) ,
35
34
outputLazyLoader ( config , compilerCtx ) ,
36
35
outputLazy ( config , compilerCtx , buildCtx ) ,
37
36
] ) ;
38
37
39
- // the www output target depends on the output of the lazy output target
40
- // since it attempts to inline the lazy build entry point into `index.html`
41
- // so we want to ensure that the lazy OT has already completed and written
42
- // all of its files before the www OT runs.
43
- await outputWww ( config , compilerCtx , buildCtx ) ;
44
-
45
- // must run after all the other outputs
46
- // since it validates files were created
47
- await outputDocs ( config , compilerCtx , buildCtx ) ;
48
- await outputTypes ( config , compilerCtx , buildCtx ) ;
49
- await outputCustom ( config , compilerCtx , buildCtx ) ;
38
+ await Promise . all ( [
39
+ // the user may want to copy compiled assets which requires above tasks to
40
+ // have finished first
41
+ outputCopy ( config , compilerCtx , buildCtx ) ,
42
+
43
+ // the www output target depends on the output of the lazy output target
44
+ // since it attempts to inline the lazy build entry point into `index.html`
45
+ // so we want to ensure that the lazy OT has already completed and written
46
+ // all of its files before the www OT runs.
47
+ outputWww ( config , compilerCtx , buildCtx ) ,
48
+
49
+ // must run after all the other outputs
50
+ // since it validates files were created
51
+ outputDocs ( config , compilerCtx , buildCtx ) ,
52
+ outputTypes ( config , compilerCtx , buildCtx ) ,
53
+ outputCustom ( config , compilerCtx , buildCtx ) ,
54
+ ] ) ;
50
55
51
56
timeSpan . finish ( 'generate outputs finished' ) ;
52
57
} ;
0 commit comments