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');
4040const CircularDependencyPlugin = require ( 'circular-dependency-plugin' ) ;
4141const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
4242
43- // tslint:disable-next-line:no-any
44- const g : any = typeof global !== 'undefined' ? global : { } ;
4543
4644// tslint:disable-next-line:no-big-function
4745export function getCommonConfig ( wco : WebpackConfigOptions ) : Configuration {
@@ -242,10 +240,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
242240 }
243241
244242 // process asset entries
245- if (
246- buildOptions . assets &&
247- ( fullDifferential || buildOptions . watch || ! differentialLoadingNeeded )
248- ) {
243+ if ( buildOptions . assets . length ) {
249244 const copyWebpackPluginPatterns = buildOptions . assets . map ( ( asset : AssetPatternClass ) => {
250245 // Resolve input paths relative to workspace root and add slash at the end.
251246 asset . input = path . resolve ( root , asset . input ) . replace ( / \\ / g, '/' ) ;
Original file line number Diff line number Diff line change @@ -13,17 +13,14 @@ import {
1313 runWebpack ,
1414} from '@angular-devkit/build-webpack' ;
1515import {
16- getSystemPath ,
1716 join ,
1817 json ,
1918 logging ,
2019 normalize ,
21- resolve ,
2220 tags ,
2321 virtualFs ,
2422} from '@angular-devkit/core' ;
2523import { NodeJsSyncHost } from '@angular-devkit/core/node' ;
26- import { createHash } from 'crypto' ;
2724import * as findCacheDirectory from 'find-cache-dir' ;
2825import * as fs from 'fs' ;
2926import * as path from 'path' ;
@@ -81,9 +78,7 @@ import {
8178import { BundleActionExecutor } from './action-executor' ;
8279import { Schema as BrowserBuilderSchema } from './schema' ;
8380
84- const cacache = require ( 'cacache' ) ;
8581const cacheDownlevelPath = findCacheDirectory ( { name : 'angular-build-dl' } ) ;
86- const packageVersion = require ( '../../package.json' ) . version ;
8782
8883export type BrowserBuilderOutput = json . JsonObject &
8984 BuilderOutput & {
Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ export async function generateWebpackConfig(
106106 } else if ( differentialLoading && ! fullDifferential ) {
107107 buildOptions = {
108108 ...options ,
109+ // Under downlevel differential loading we copy the assets outside of webpack.
110+ assets : [ ] ,
109111 esVersionInFileName : true ,
110112 scriptTargetOverride : ts . ScriptTarget . ES5 ,
111113 es5BrowserSupport : undefined ,
You can’t perform that action at this time.
0 commit comments