@@ -26,31 +26,48 @@ function canUseIvyPlugin(wco: WebpackConfigOptions): boolean {
26
26
return false ;
27
27
}
28
28
29
- // Allow fallback to legacy build system via environment variable ('NG_BUILD_IVY_LEGACY=1')
30
- const flag = process . env [ 'NG_BUILD_IVY_LEGACY' ] ;
31
- if ( flag !== undefined && flag !== '0' && flag . toLowerCase ( ) !== 'false' ) {
32
- wco . logger . warn (
33
- '"NG_BUILD_IVY_LEGACY" environment variable detected. Using legacy Ivy build system.' ,
34
- ) ;
35
-
29
+ // Allow new ivy build system via environment variable ('NG_BUILD_IVY_EXPERIMENTAL=1')
30
+ // TODO: Remove this section and adjust warnings below once the Ivy plugin is the default
31
+ const flag = process . env [ 'NG_BUILD_IVY_EXPERIMENTAL' ] ;
32
+ if ( flag === undefined || flag === '0' || flag . toLowerCase ( ) === 'false' ) {
36
33
return false ;
37
34
}
38
35
36
+ // Allow fallback to legacy build system via environment variable ('NG_BUILD_IVY_LEGACY=1')
37
+ // TODO: Enable this section once the Ivy plugin is the default
38
+ // const flag = process.env['NG_BUILD_IVY_LEGACY'];
39
+ // if (flag !== undefined && flag !== '0' && flag.toLowerCase() !== 'false') {
40
+ // wco.logger.warn(
41
+ // '"NG_BUILD_IVY_LEGACY" environment variable detected. Using legacy Ivy build system.',
42
+ // );
43
+
44
+ // return false;
45
+ // }
46
+
39
47
// Lazy modules option uses the deprecated string format for lazy routes which is not supported
40
48
if ( wco . buildOptions . lazyModules && wco . buildOptions . lazyModules . length > 0 ) {
41
49
wco . logger . warn (
42
- '"lazyModules" option is deprecated and not supported by the new Ivy build system. ' +
43
- 'Using legacy Ivy build system.'
50
+ '"lazyModules" option is deprecated and not supported by the experimental Ivy build system. ' +
51
+ 'Using existing Ivy build system.'
44
52
) ;
45
53
46
54
return false ;
47
55
}
48
56
49
57
// This pass relies on internals of the original plugin
50
58
if ( wco . buildOptions . experimentalRollupPass ) {
59
+ wco . logger . warn (
60
+ 'The experimental rollup pass is not supported by the experimental Ivy build system. ' +
61
+ 'Using existing Ivy build system.'
62
+ ) ;
63
+
51
64
return false ;
52
65
}
53
66
67
+ wco . logger . warn (
68
+ '"NG_BUILD_IVY_EXPERIMENTAL" environment variable detected. Using experimental Ivy build system.' ,
69
+ ) ;
70
+
54
71
return true ;
55
72
}
56
73
0 commit comments