File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed
packages/angular_devkit/build_angular/src
angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
40
40
const CircularDependencyPlugin = require ( 'circular-dependency-plugin' ) ;
41
41
const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
42
42
43
- // tslint:disable-next-line:no-any
44
- const g : any = typeof global !== 'undefined' ? global : { } ;
45
43
46
44
// tslint:disable-next-line:no-big-function
47
45
export function getCommonConfig ( wco : WebpackConfigOptions ) : Configuration {
@@ -242,10 +240,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
242
240
}
243
241
244
242
// process asset entries
245
- if (
246
- buildOptions . assets &&
247
- ( fullDifferential || buildOptions . watch || ! differentialLoadingNeeded )
248
- ) {
243
+ if ( buildOptions . assets . length ) {
249
244
const copyWebpackPluginPatterns = buildOptions . assets . map ( ( asset : AssetPatternClass ) => {
250
245
// Resolve input paths relative to workspace root and add slash at the end.
251
246
asset . input = path . resolve ( root , asset . input ) . replace ( / \\ / g, '/' ) ;
Original file line number Diff line number Diff line change @@ -13,17 +13,14 @@ import {
13
13
runWebpack ,
14
14
} from '@angular-devkit/build-webpack' ;
15
15
import {
16
- getSystemPath ,
17
16
join ,
18
17
json ,
19
18
logging ,
20
19
normalize ,
21
- resolve ,
22
20
tags ,
23
21
virtualFs ,
24
22
} from '@angular-devkit/core' ;
25
23
import { NodeJsSyncHost } from '@angular-devkit/core/node' ;
26
- import { createHash } from 'crypto' ;
27
24
import * as findCacheDirectory from 'find-cache-dir' ;
28
25
import * as fs from 'fs' ;
29
26
import * as path from 'path' ;
@@ -81,9 +78,7 @@ import {
81
78
import { BundleActionExecutor } from './action-executor' ;
82
79
import { Schema as BrowserBuilderSchema } from './schema' ;
83
80
84
- const cacache = require ( 'cacache' ) ;
85
81
const cacheDownlevelPath = findCacheDirectory ( { name : 'angular-build-dl' } ) ;
86
- const packageVersion = require ( '../../package.json' ) . version ;
87
82
88
83
export type BrowserBuilderOutput = json . JsonObject &
89
84
BuilderOutput & {
Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ export async function generateWebpackConfig(
106
106
} else if ( differentialLoading && ! fullDifferential ) {
107
107
buildOptions = {
108
108
...options ,
109
+ // Under downlevel differential loading we copy the assets outside of webpack.
110
+ assets : [ ] ,
109
111
esVersionInFileName : true ,
110
112
scriptTargetOverride : ts . ScriptTarget . ES5 ,
111
113
es5BrowserSupport : undefined ,
You can’t perform that action at this time.
0 commit comments