@angular-devkit/build-angular 0.901.7 → 0.901.11
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
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.901.
|
|
3
|
+
"version": "0.901.11",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"experimental": true,
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"typings": "src/index.d.ts",
|
|
8
8
|
"builders": "builders.json",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@angular-devkit/architect": "0.901.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.901.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.901.
|
|
13
|
-
"@angular-devkit/core": "9.1.
|
|
10
|
+
"@angular-devkit/architect": "0.901.11",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.901.11",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.901.11",
|
|
13
|
+
"@angular-devkit/core": "9.1.11",
|
|
14
14
|
"@babel/core": "7.9.0",
|
|
15
15
|
"@babel/generator": "7.9.3",
|
|
16
16
|
"@babel/preset-env": "7.9.0",
|
|
17
17
|
"@babel/template": "7.8.6",
|
|
18
18
|
"@jsdevtools/coverage-istanbul-loader": "3.0.3",
|
|
19
|
-
"@ngtools/webpack": "9.1.
|
|
19
|
+
"@ngtools/webpack": "9.1.11",
|
|
20
20
|
"ajv": "6.12.0",
|
|
21
21
|
"autoprefixer": "9.7.4",
|
|
22
22
|
"babel-loader": "8.0.6",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"cacache": "15.0.0",
|
|
25
25
|
"caniuse-lite": "^1.0.30001032",
|
|
26
26
|
"circular-dependency-plugin": "5.2.0",
|
|
27
|
-
"copy-webpack-plugin": "
|
|
27
|
+
"copy-webpack-plugin": "6.0.3",
|
|
28
28
|
"core-js": "3.6.4",
|
|
29
29
|
"css-loader": "3.5.1",
|
|
30
30
|
"cssnano": "4.1.10",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"glob": "7.1.6",
|
|
34
34
|
"jest-worker": "25.1.0",
|
|
35
35
|
"karma-source-map-support": "1.4.0",
|
|
36
|
-
"less": "3.11.
|
|
36
|
+
"less": "3.11.3",
|
|
37
37
|
"less-loader": "5.0.0",
|
|
38
38
|
"license-webpack-plugin": "2.1.4",
|
|
39
39
|
"loader-utils": "2.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"stylus-loader": "3.0.2",
|
|
61
61
|
"tree-kill": "1.2.2",
|
|
62
62
|
"terser": "4.6.10",
|
|
63
|
-
"terser-webpack-plugin": "
|
|
63
|
+
"terser-webpack-plugin": "3.0.3",
|
|
64
64
|
"webpack": "4.42.0",
|
|
65
65
|
"webpack-dev-middleware": "3.7.2",
|
|
66
66
|
"webpack-dev-server": "3.11.0",
|
|
@@ -185,27 +185,37 @@ function getCommonConfig(wco) {
|
|
|
185
185
|
if (buildOptions.assets.length) {
|
|
186
186
|
const copyWebpackPluginPatterns = buildOptions.assets.map((asset) => {
|
|
187
187
|
// Resolve input paths relative to workspace root and add slash at the end.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
// tslint:disable-next-line: prefer-const
|
|
189
|
+
let { input, output, ignore = [], glob } = asset;
|
|
190
|
+
input = path.resolve(root, input).replace(/\\/g, '/');
|
|
191
|
+
input = input.endsWith('/') ? input : input + '/';
|
|
192
|
+
output = output.endsWith('/') ? output : output + '/';
|
|
193
|
+
if (output.startsWith('..')) {
|
|
194
|
+
throw new Error('An asset cannot be written to a location outside of the output path.');
|
|
194
195
|
}
|
|
195
196
|
return {
|
|
196
|
-
context:
|
|
197
|
+
context: input,
|
|
197
198
|
// Now we remove starting slash to make Webpack place it from the output root.
|
|
198
|
-
to:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
to: output.replace(/^\//, ''),
|
|
200
|
+
from: glob,
|
|
201
|
+
noErrorOnMissing: true,
|
|
202
|
+
globOptions: {
|
|
202
203
|
dot: true,
|
|
204
|
+
ignore: [
|
|
205
|
+
'.gitkeep',
|
|
206
|
+
'**/.DS_Store',
|
|
207
|
+
'**/Thumbs.db',
|
|
208
|
+
// Negate patterns needs to be absolute because copy-webpack-plugin uses absolute globs which
|
|
209
|
+
// causes negate patterns not to match.
|
|
210
|
+
// See: https://github.com/webpack-contrib/copy-webpack-plugin/issues/498#issuecomment-639327909
|
|
211
|
+
...ignore,
|
|
212
|
+
].map(i => path.posix.join(input, i)),
|
|
203
213
|
},
|
|
204
214
|
};
|
|
205
215
|
});
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
216
|
+
extraPlugins.push(new CopyWebpackPlugin({
|
|
217
|
+
patterns: copyWebpackPluginPatterns,
|
|
218
|
+
}));
|
|
209
219
|
}
|
|
210
220
|
if (buildOptions.progress) {
|
|
211
221
|
extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose }));
|
|
@@ -331,12 +341,13 @@ function getCommonConfig(wco) {
|
|
|
331
341
|
// Name mangling is handled within the browser builder
|
|
332
342
|
mangle: environment_options_1.allowMangle && buildOptions.platform !== 'server' && !differentialLoadingMode,
|
|
333
343
|
};
|
|
344
|
+
const globalScriptsNames = globalScriptsByBundleName.map(s => s.bundleName);
|
|
334
345
|
extraMinimizers.push(new TerserPlugin({
|
|
335
346
|
sourceMap: scriptsSourceMap,
|
|
336
347
|
parallel: utils_1.maxWorkers,
|
|
337
348
|
cache: !environment_options_1.cachingDisabled && cache_path_1.findCachePath('terser-webpack'),
|
|
338
349
|
extractComments: false,
|
|
339
|
-
|
|
350
|
+
exclude: globalScriptsNames,
|
|
340
351
|
terserOptions,
|
|
341
352
|
}),
|
|
342
353
|
// Script bundles are fully optimized here in one step since they are never downleveled.
|
|
@@ -346,7 +357,7 @@ function getCommonConfig(wco) {
|
|
|
346
357
|
parallel: utils_1.maxWorkers,
|
|
347
358
|
cache: !environment_options_1.cachingDisabled && cache_path_1.findCachePath('terser-webpack'),
|
|
348
359
|
extractComments: false,
|
|
349
|
-
|
|
360
|
+
include: globalScriptsNames,
|
|
350
361
|
terserOptions: {
|
|
351
362
|
...terserOptions,
|
|
352
363
|
compress: environment_options_1.allowMinify && {
|