File tree 1 file changed +5
-14
lines changed
packages/angular_devkit/build_angular/src/utils
1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -68,30 +68,21 @@ export async function generateWebpackConfig(
68
68
// For differential loading, we can have several targets
69
69
return scriptTargets . map ( scriptTarget => {
70
70
let buildOptions : NormalizedBrowserBuilderSchema = { ...options } ;
71
- const supportES2015
72
- = scriptTarget !== ts . ScriptTarget . ES3 && scriptTarget !== ts . ScriptTarget . ES5 ;
73
-
74
71
if ( differentialLoading ) {
72
+ // For differential loading, the builder needs to created the index.html by itself
73
+ // without using a webpack plugin.
75
74
buildOptions = {
76
75
...options ,
77
- ...(
78
- // FIXME: we do create better webpack config composition to achieve the below
79
- // When DL is enabled and supportES2015 is true it means that we are on the second build
80
- // This also means that we don't need to include styles and assets multiple times
81
- supportES2015
82
- ? { }
83
- : {
84
- styles : options . extractCss ? [ ] : options . styles ,
85
- assets : [ ] ,
86
- }
87
- ) ,
88
76
es5BrowserSupport : undefined ,
89
77
index : '' ,
90
78
esVersionInFileName : true ,
91
79
scriptTargetOverride : scriptTarget ,
92
80
} ;
93
81
}
94
82
83
+ const supportES2015
84
+ = scriptTarget !== ts . ScriptTarget . ES3 && scriptTarget !== ts . ScriptTarget . ES5 ;
85
+
95
86
const wco : BrowserWebpackConfigOptions = {
96
87
root : workspaceRoot ,
97
88
logger : logger . createChild ( 'webpackConfigOptions' ) ,
You can’t perform that action at this time.
0 commit comments