source: trip-planner-front/node_modules/@angular-devkit/build-angular/src/utils/package-chunk-sort.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.generateEntryPoints = void 0;
11const helpers_1 = require("../webpack/utils/helpers");
12function generateEntryPoints(appConfig) {
13 // Add all styles/scripts, except lazy-loaded ones.
14 const extraEntryPoints = (extraEntryPoints, defaultBundleName) => {
15 const entryPoints = helpers_1.normalizeExtraEntryPoints(extraEntryPoints, defaultBundleName)
16 .filter((entry) => entry.inject)
17 .map((entry) => entry.bundleName);
18 // remove duplicates
19 return [...new Set(entryPoints)];
20 };
21 const entryPoints = [
22 'runtime',
23 'polyfills-es5',
24 'polyfills',
25 'sw-register',
26 ...extraEntryPoints(appConfig.styles, 'styles'),
27 ...extraEntryPoints(appConfig.scripts, 'scripts'),
28 'vendor',
29 'main',
30 ];
31 const duplicates = [
32 ...new Set(entryPoints.filter((x) => entryPoints.indexOf(x) !== entryPoints.lastIndexOf(x))),
33 ];
34 if (duplicates.length > 0) {
35 throw new Error(`Multiple bundles have been named the same: '${duplicates.join(`', '`)}'.`);
36 }
37 return entryPoints;
38}
39exports.generateEntryPoints = generateEntryPoints;
Note: See TracBrowser for help on using the repository browser.