@angular-devkit/build-angular 14.0.0-next.1 → 14.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -20
- package/src/builders/app-shell/index.js +3 -2
- package/src/builders/browser/index.d.ts +2 -3
- package/src/builders/browser/index.js +6 -6
- package/src/builders/dev-server/index.d.ts +1 -1
- package/src/builders/extract-i18n/index.d.ts +1 -1
- package/src/builders/protractor/index.d.ts +2 -1
- package/src/builders/server/index.d.ts +2 -3
- package/src/utils/normalize-builder-schema.d.ts +2 -2
- package/src/utils/normalize-builder-schema.js +5 -5
- package/src/utils/webpack-browser-config.js +9 -11
- package/src/webpack/plugins/named-chunks-plugin.js +4 -0
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.4",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"builders": "builders.json",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@ampproject/remapping": "2.1.
|
|
10
|
-
"@angular-devkit/architect": "0.1400.0-next.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1400.0-next.
|
|
12
|
-
"@angular-devkit/core": "14.0.0-next.
|
|
13
|
-
"@babel/core": "7.17.
|
|
14
|
-
"@babel/generator": "7.17.
|
|
9
|
+
"@ampproject/remapping": "2.1.2",
|
|
10
|
+
"@angular-devkit/architect": "0.1400.0-next.4",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1400.0-next.4",
|
|
12
|
+
"@angular-devkit/core": "14.0.0-next.4",
|
|
13
|
+
"@babel/core": "7.17.5",
|
|
14
|
+
"@babel/generator": "7.17.3",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.16.7",
|
|
16
16
|
"@babel/plugin-proposal-async-generator-functions": "7.16.8",
|
|
17
17
|
"@babel/plugin-transform-async-to-generator": "7.16.8",
|
|
18
18
|
"@babel/plugin-transform-runtime": "7.17.0",
|
|
19
19
|
"@babel/preset-env": "7.16.11",
|
|
20
|
-
"@babel/runtime": "7.17.
|
|
20
|
+
"@babel/runtime": "7.17.2",
|
|
21
21
|
"@babel/template": "7.16.7",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.6",
|
|
23
|
-
"@ngtools/webpack": "14.0.0-next.
|
|
23
|
+
"@ngtools/webpack": "14.0.0-next.4",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
27
27
|
"browserslist": "^4.9.1",
|
|
28
28
|
"cacache": "15.3.0",
|
|
29
29
|
"copy-webpack-plugin": "10.2.4",
|
|
30
|
-
"core-js": "3.21.
|
|
30
|
+
"core-js": "3.21.1",
|
|
31
31
|
"critters": "0.0.16",
|
|
32
32
|
"css-loader": "6.6.0",
|
|
33
|
-
"esbuild-wasm": "0.14.
|
|
33
|
+
"esbuild-wasm": "0.14.23",
|
|
34
34
|
"glob": "7.2.0",
|
|
35
35
|
"https-proxy-agent": "5.0.0",
|
|
36
36
|
"inquirer": "8.2.0",
|
|
@@ -38,40 +38,40 @@
|
|
|
38
38
|
"karma-source-map-support": "1.4.0",
|
|
39
39
|
"less": "4.1.2",
|
|
40
40
|
"less-loader": "10.2.0",
|
|
41
|
-
"license-webpack-plugin": "4.0.
|
|
41
|
+
"license-webpack-plugin": "4.0.2",
|
|
42
42
|
"loader-utils": "3.2.0",
|
|
43
43
|
"mini-css-extract-plugin": "2.5.3",
|
|
44
|
-
"minimatch": "
|
|
44
|
+
"minimatch": "5.0.1",
|
|
45
45
|
"open": "8.4.0",
|
|
46
46
|
"ora": "5.4.1",
|
|
47
47
|
"parse5-html-rewriting-stream": "6.0.1",
|
|
48
48
|
"piscina": "3.2.0",
|
|
49
|
-
"postcss": "8.4.
|
|
49
|
+
"postcss": "8.4.7",
|
|
50
50
|
"postcss-import": "14.0.2",
|
|
51
51
|
"postcss-loader": "6.2.1",
|
|
52
|
-
"postcss-preset-env": "7.
|
|
52
|
+
"postcss-preset-env": "7.4.1",
|
|
53
53
|
"regenerator-runtime": "0.13.9",
|
|
54
54
|
"resolve-url-loader": "5.0.0",
|
|
55
55
|
"rxjs": "6.6.7",
|
|
56
|
-
"sass": "1.49.
|
|
57
|
-
"sass-loader": "12.
|
|
56
|
+
"sass": "1.49.9",
|
|
57
|
+
"sass-loader": "12.6.0",
|
|
58
58
|
"semver": "7.3.5",
|
|
59
59
|
"source-map-loader": "3.0.1",
|
|
60
60
|
"source-map-support": "0.5.21",
|
|
61
61
|
"stylus": "0.56.0",
|
|
62
62
|
"stylus-loader": "6.2.0",
|
|
63
|
-
"terser": "5.
|
|
63
|
+
"terser": "5.12.0",
|
|
64
64
|
"text-table": "0.2.0",
|
|
65
65
|
"tree-kill": "1.2.2",
|
|
66
66
|
"tslib": "2.3.1",
|
|
67
|
-
"webpack": "5.
|
|
67
|
+
"webpack": "5.69.1",
|
|
68
68
|
"webpack-dev-middleware": "5.3.1",
|
|
69
69
|
"webpack-dev-server": "4.7.4",
|
|
70
70
|
"webpack-merge": "5.8.0",
|
|
71
71
|
"webpack-subresource-integrity": "5.1.0"
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
74
|
-
"esbuild": "0.14.
|
|
74
|
+
"esbuild": "0.14.23"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@angular/compiler-cli": "^14.0.0 || ^14.0.0-next",
|
|
@@ -35,6 +35,7 @@ const inline_critical_css_1 = require("../../utils/index-file/inline-critical-cs
|
|
|
35
35
|
const service_worker_1 = require("../../utils/service-worker");
|
|
36
36
|
const spinner_1 = require("../../utils/spinner");
|
|
37
37
|
async function _renderUniversal(options, context, browserResult, serverResult, spinner) {
|
|
38
|
+
var _a;
|
|
38
39
|
// Get browser target options.
|
|
39
40
|
const browserTarget = (0, architect_1.targetFromTargetString)(options.browserTarget);
|
|
40
41
|
const rawBrowserOptions = (await context.getTargetOptions(browserTarget));
|
|
@@ -49,7 +50,7 @@ async function _renderUniversal(options, context, browserResult, serverResult, s
|
|
|
49
50
|
throw new Error('The builder requires a target.');
|
|
50
51
|
}
|
|
51
52
|
const projectMetadata = await context.getProjectMetadata(projectName);
|
|
52
|
-
const projectRoot = (
|
|
53
|
+
const projectRoot = path.join(root, (_a = projectMetadata.root) !== null && _a !== void 0 ? _a : '');
|
|
53
54
|
const { styles } = (0, utils_1.normalizeOptimization)(browserOptions.optimization);
|
|
54
55
|
const inlineCriticalCssProcessor = styles.inlineCritical
|
|
55
56
|
? new inline_critical_css_1.InlineCriticalCssProcessor({
|
|
@@ -91,7 +92,7 @@ async function _renderUniversal(options, context, browserResult, serverResult, s
|
|
|
91
92
|
}
|
|
92
93
|
await fs.promises.writeFile(outputIndexPath, html);
|
|
93
94
|
if (browserOptions.serviceWorker) {
|
|
94
|
-
await (0, service_worker_1.augmentAppWithServiceWorker)(projectRoot, (0, core_1.normalize)(outputPath), browserOptions.baseHref || '/', browserOptions.ngswConfigPath);
|
|
95
|
+
await (0, service_worker_1.augmentAppWithServiceWorker)((0, core_1.normalize)(projectRoot), (0, core_1.normalize)(outputPath), browserOptions.baseHref || '/', browserOptions.ngswConfigPath);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
return browserResult;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { WebpackLoggingCallback } from '@angular-devkit/build-webpack';
|
|
10
|
-
import { json } from '@angular-devkit/core';
|
|
11
10
|
import { Observable } from 'rxjs';
|
|
12
11
|
import webpack from 'webpack';
|
|
13
12
|
import { ExecutionTransformer } from '../../transforms';
|
|
@@ -16,7 +15,7 @@ import { Schema as BrowserBuilderSchema } from './schema';
|
|
|
16
15
|
/**
|
|
17
16
|
* @experimental Direct usage of this type is considered experimental.
|
|
18
17
|
*/
|
|
19
|
-
export declare type BrowserBuilderOutput =
|
|
18
|
+
export declare type BrowserBuilderOutput = BuilderOutput & {
|
|
20
19
|
baseOutputPath: string;
|
|
21
20
|
outputPaths: string[];
|
|
22
21
|
/**
|
|
@@ -37,5 +36,5 @@ export declare function buildWebpackBrowser(options: BrowserBuilderSchema, conte
|
|
|
37
36
|
logging?: WebpackLoggingCallback;
|
|
38
37
|
indexHtml?: IndexHtmlTransform;
|
|
39
38
|
}): Observable<BrowserBuilderOutput>;
|
|
40
|
-
declare const _default: import("@angular-devkit/architect/src/internal").Builder<
|
|
39
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<BrowserBuilderSchema & import("@angular-devkit/core").JsonObject>;
|
|
41
40
|
export default _default;
|
|
@@ -92,7 +92,6 @@ async function initialize(options, context, webpackConfigurationTransform) {
|
|
|
92
92
|
// eslint-disable-next-line max-lines-per-function
|
|
93
93
|
function buildWebpackBrowser(options, context, transforms = {}) {
|
|
94
94
|
var _a;
|
|
95
|
-
const root = (0, core_1.normalize)(context.workspaceRoot);
|
|
96
95
|
const projectName = (_a = context.target) === null || _a === void 0 ? void 0 : _a.project;
|
|
97
96
|
if (!projectName) {
|
|
98
97
|
throw new Error('The builder requires a target.');
|
|
@@ -102,13 +101,14 @@ function buildWebpackBrowser(options, context, transforms = {}) {
|
|
|
102
101
|
// Check Angular version.
|
|
103
102
|
(0, version_1.assertCompatibleAngularVersion)(context.workspaceRoot);
|
|
104
103
|
return (0, rxjs_1.from)(context.getProjectMetadata(projectName)).pipe((0, operators_1.switchMap)(async (projectMetadata) => {
|
|
105
|
-
var _a;
|
|
106
|
-
const sysProjectRoot = (0, core_1.getSystemPath)((0, core_1.resolve)((0, core_1.normalize)(context.workspaceRoot), (0, core_1.normalize)((_a = projectMetadata.root) !== null && _a !== void 0 ? _a : '')));
|
|
107
104
|
// Purge old build disk cache.
|
|
108
105
|
await (0, purge_cache_1.purgeStaleBuildCache)(context);
|
|
109
|
-
|
|
106
|
+
// Initialize builder
|
|
107
|
+
const initialization = await initialize(options, context, transforms.webpackConfiguration);
|
|
108
|
+
// Check and warn about IE browser support
|
|
109
|
+
checkInternetExplorerSupport(initialization.projectRoot, context.logger);
|
|
110
110
|
return {
|
|
111
|
-
...
|
|
111
|
+
...initialization,
|
|
112
112
|
cacheOptions: (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, context.workspaceRoot),
|
|
113
113
|
};
|
|
114
114
|
}), (0, operators_1.switchMap)(
|
|
@@ -185,7 +185,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
|
|
|
185
185
|
if (!options.watch && ((_c = options.assets) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
186
186
|
spinner.start('Copying assets...');
|
|
187
187
|
try {
|
|
188
|
-
await (0, copy_assets_1.copyAssets)((0, utils_1.normalizeAssetPatterns)(options.assets,
|
|
188
|
+
await (0, copy_assets_1.copyAssets)((0, utils_1.normalizeAssetPatterns)(options.assets, (0, core_1.normalize)(context.workspaceRoot), (0, core_1.normalize)(projectRoot), projectSourceRoot === undefined ? undefined : (0, core_1.normalize)(projectSourceRoot)), Array.from(outputPaths.values()), context.workspaceRoot);
|
|
189
189
|
spinner.succeed('Copying assets complete.');
|
|
190
190
|
}
|
|
191
191
|
catch (err) {
|
|
@@ -13,7 +13,7 @@ import webpack from 'webpack';
|
|
|
13
13
|
import { ExecutionTransformer } from '../../transforms';
|
|
14
14
|
import { IndexHtmlTransform } from '../../utils/index-file/index-html-generator';
|
|
15
15
|
import { Schema } from './schema';
|
|
16
|
-
export declare type DevServerBuilderOptions = Schema
|
|
16
|
+
export declare type DevServerBuilderOptions = Schema;
|
|
17
17
|
/**
|
|
18
18
|
* @experimental Direct usage of this type is considered experimental.
|
|
19
19
|
*/
|
|
@@ -11,7 +11,7 @@ import { JsonObject } from '@angular-devkit/core';
|
|
|
11
11
|
import webpack from 'webpack';
|
|
12
12
|
import { ExecutionTransformer } from '../../transforms';
|
|
13
13
|
import { Schema } from './schema';
|
|
14
|
-
export declare type ExtractI18nBuilderOptions = Schema
|
|
14
|
+
export declare type ExtractI18nBuilderOptions = Schema;
|
|
15
15
|
/**
|
|
16
16
|
* @experimental Direct usage of this function is considered experimental.
|
|
17
17
|
*/
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
|
+
import { json } from '@angular-devkit/core';
|
|
9
10
|
import { Schema as ProtractorBuilderOptions } from './schema';
|
|
10
11
|
export { ProtractorBuilderOptions };
|
|
11
12
|
/**
|
|
12
13
|
* @experimental Direct usage of this function is considered experimental.
|
|
13
14
|
*/
|
|
14
15
|
export declare function execute(options: ProtractorBuilderOptions, context: BuilderContext): Promise<BuilderOutput>;
|
|
15
|
-
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ProtractorBuilderOptions &
|
|
16
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ProtractorBuilderOptions & json.JsonObject>;
|
|
16
17
|
export default _default;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
|
-
import { json } from '@angular-devkit/core';
|
|
10
9
|
import { Observable } from 'rxjs';
|
|
11
10
|
import webpack from 'webpack';
|
|
12
11
|
import { ExecutionTransformer } from '../../transforms';
|
|
@@ -14,7 +13,7 @@ import { Schema as ServerBuilderOptions } from './schema';
|
|
|
14
13
|
/**
|
|
15
14
|
* @experimental Direct usage of this type is considered experimental.
|
|
16
15
|
*/
|
|
17
|
-
export declare type ServerBuilderOutput =
|
|
16
|
+
export declare type ServerBuilderOutput = BuilderOutput & {
|
|
18
17
|
baseOutputPath: string;
|
|
19
18
|
outputPaths: string[];
|
|
20
19
|
/**
|
|
@@ -29,5 +28,5 @@ export { ServerBuilderOptions };
|
|
|
29
28
|
export declare function execute(options: ServerBuilderOptions, context: BuilderContext, transforms?: {
|
|
30
29
|
webpackConfiguration?: ExecutionTransformer<webpack.Configuration>;
|
|
31
30
|
}): Observable<ServerBuilderOutput>;
|
|
32
|
-
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ServerBuilderOptions &
|
|
31
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ServerBuilderOptions & import("@angular-devkit/core").JsonObject>;
|
|
33
32
|
export default _default;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { json } from '@angular-devkit/core';
|
|
9
9
|
import { AssetPatternClass, Schema as BrowserBuilderSchema, SourceMapClass } from '../builders/browser/schema';
|
|
10
10
|
import { BuildOptions } from './build-options';
|
|
11
11
|
import { NormalizedFileReplacement } from './normalize-file-replacements';
|
|
@@ -19,4 +19,4 @@ export declare type NormalizedBrowserBuilderSchema = BrowserBuilderSchema & Buil
|
|
|
19
19
|
fileReplacements: NormalizedFileReplacement[];
|
|
20
20
|
optimization: NormalizedOptimizationOptions;
|
|
21
21
|
};
|
|
22
|
-
export declare function normalizeBrowserSchema(
|
|
22
|
+
export declare function normalizeBrowserSchema(workspaceRoot: string, projectRoot: string, projectSourceRoot: string | undefined, options: BrowserBuilderSchema, metadata: json.JsonObject): NormalizedBrowserBuilderSchema;
|
|
@@ -15,13 +15,13 @@ const normalize_file_replacements_1 = require("./normalize-file-replacements");
|
|
|
15
15
|
const normalize_optimization_1 = require("./normalize-optimization");
|
|
16
16
|
const normalize_source_maps_1 = require("./normalize-source-maps");
|
|
17
17
|
const supported_browsers_1 = require("./supported-browsers");
|
|
18
|
-
function normalizeBrowserSchema(
|
|
18
|
+
function normalizeBrowserSchema(workspaceRoot, projectRoot, projectSourceRoot, options, metadata) {
|
|
19
19
|
const normalizedSourceMapOptions = (0, normalize_source_maps_1.normalizeSourceMaps)(options.sourceMap || false);
|
|
20
20
|
return {
|
|
21
21
|
...options,
|
|
22
|
-
cache: (0, normalize_cache_1.normalizeCacheOptions)(metadata,
|
|
23
|
-
assets: (0, normalize_asset_patterns_1.normalizeAssetPatterns)(options.assets || [],
|
|
24
|
-
fileReplacements: (0, normalize_file_replacements_1.normalizeFileReplacements)(options.fileReplacements || [],
|
|
22
|
+
cache: (0, normalize_cache_1.normalizeCacheOptions)(metadata, workspaceRoot),
|
|
23
|
+
assets: (0, normalize_asset_patterns_1.normalizeAssetPatterns)(options.assets || [], (0, core_1.normalize)(workspaceRoot), (0, core_1.normalize)(projectRoot), projectSourceRoot ? (0, core_1.normalize)(projectSourceRoot) : undefined),
|
|
24
|
+
fileReplacements: (0, normalize_file_replacements_1.normalizeFileReplacements)(options.fileReplacements || [], (0, core_1.normalize)(workspaceRoot)),
|
|
25
25
|
optimization: (0, normalize_optimization_1.normalizeOptimization)(options.optimization),
|
|
26
26
|
sourceMap: normalizedSourceMapOptions,
|
|
27
27
|
preserveSymlinks: options.preserveSymlinks === undefined
|
|
@@ -38,7 +38,7 @@ function normalizeBrowserSchema(root, projectRoot, sourceRoot, options, metadata
|
|
|
38
38
|
// A value of 0 is falsy and will disable polling rather then enable
|
|
39
39
|
// 500 ms is a sensible default in this case
|
|
40
40
|
poll: options.poll === 0 ? 500 : options.poll,
|
|
41
|
-
supportedBrowsers: (0, supported_browsers_1.getSupportedBrowsers)(
|
|
41
|
+
supportedBrowsers: (0, supported_browsers_1.getSupportedBrowsers)(projectRoot),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
exports.normalizeBrowserSchema = normalizeBrowserSchema;
|
|
@@ -27,7 +27,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.getIndexInputFile = exports.getIndexOutputFile = exports.generateBrowserWebpackConfigFromContext = exports.generateI18nBrowserWebpackConfigFromContext = exports.generateWebpackConfig = void 0;
|
|
30
|
-
const core_1 = require("@angular-devkit/core");
|
|
31
30
|
const path = __importStar(require("path"));
|
|
32
31
|
const typescript_1 = require("typescript");
|
|
33
32
|
const webpack_1 = require("webpack");
|
|
@@ -108,19 +107,18 @@ async function generateI18nBrowserWebpackConfigFromContext(options, context, web
|
|
|
108
107
|
}
|
|
109
108
|
exports.generateI18nBrowserWebpackConfigFromContext = generateI18nBrowserWebpackConfigFromContext;
|
|
110
109
|
async function generateBrowserWebpackConfigFromContext(options, context, webpackPartialGenerator, extraBuildOptions = {}) {
|
|
110
|
+
var _a;
|
|
111
111
|
const projectName = context.target && context.target.project;
|
|
112
112
|
if (!projectName) {
|
|
113
113
|
throw new Error('The builder requires a target.');
|
|
114
114
|
}
|
|
115
|
-
const workspaceRoot =
|
|
115
|
+
const workspaceRoot = context.workspaceRoot;
|
|
116
116
|
const projectMetadata = await context.getProjectMetadata(projectName);
|
|
117
|
-
const projectRoot =
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const normalizedOptions = (0, utils_1.normalizeBrowserSchema)(workspaceRoot, projectRoot, sourceRoot, options, projectMetadata);
|
|
123
|
-
const config = await generateWebpackConfig((0, core_1.getSystemPath)(workspaceRoot), (0, core_1.getSystemPath)(projectRoot), sourceRoot && (0, core_1.getSystemPath)(sourceRoot), projectName, normalizedOptions, webpackPartialGenerator, context.logger, extraBuildOptions);
|
|
117
|
+
const projectRoot = path.join(workspaceRoot, (_a = projectMetadata.root) !== null && _a !== void 0 ? _a : '');
|
|
118
|
+
const sourceRoot = projectMetadata.sourceRoot;
|
|
119
|
+
const projectSourceRoot = sourceRoot ? path.join(workspaceRoot, sourceRoot) : undefined;
|
|
120
|
+
const normalizedOptions = (0, utils_1.normalizeBrowserSchema)(workspaceRoot, projectRoot, projectSourceRoot, options, projectMetadata);
|
|
121
|
+
const config = await generateWebpackConfig(workspaceRoot, projectRoot, projectSourceRoot, projectName, normalizedOptions, webpackPartialGenerator, context.logger, extraBuildOptions);
|
|
124
122
|
// If builder watch support is present in the context, add watch plugin
|
|
125
123
|
// This is internal only and currently only used for testing
|
|
126
124
|
const watcherFactory = context.watcherFactory;
|
|
@@ -132,8 +130,8 @@ async function generateBrowserWebpackConfigFromContext(options, context, webpack
|
|
|
132
130
|
}
|
|
133
131
|
return {
|
|
134
132
|
config,
|
|
135
|
-
projectRoot
|
|
136
|
-
projectSourceRoot
|
|
133
|
+
projectRoot,
|
|
134
|
+
projectSourceRoot,
|
|
137
135
|
};
|
|
138
136
|
}
|
|
139
137
|
exports.generateBrowserWebpackConfigFromContext = generateBrowserWebpackConfigFromContext;
|
|
@@ -37,6 +37,10 @@ class NamedChunksPlugin {
|
|
|
37
37
|
if (!(block instanceof webpack_1.AsyncDependenciesBlock)) {
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
40
|
+
if (block.groupOptions.name) {
|
|
41
|
+
// Ignore groups which have been named already.
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
40
44
|
for (const dependency of block.dependencies) {
|
|
41
45
|
if (dependency instanceof ImportDependency) {
|
|
42
46
|
return webpack_1.Template.toPath(dependency.request);
|