@angular-devkit/build-angular 0.802.1 → 0.802.2
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,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.802.
|
|
3
|
+
"version": "0.802.2",
|
|
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.802.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.802.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.802.
|
|
13
|
-
"@angular-devkit/core": "8.2.
|
|
14
|
-
"@ngtools/webpack": "8.2.
|
|
10
|
+
"@angular-devkit/architect": "0.802.2",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.802.2",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.802.2",
|
|
13
|
+
"@angular-devkit/core": "8.2.2",
|
|
14
|
+
"@ngtools/webpack": "8.2.2",
|
|
15
15
|
"ajv": "6.10.2",
|
|
16
16
|
"autoprefixer": "9.6.1",
|
|
17
17
|
"browserslist": "4.6.6",
|
|
@@ -168,7 +168,13 @@ function getStylesConfig(wco) {
|
|
|
168
168
|
options: {
|
|
169
169
|
ident: 'embedded',
|
|
170
170
|
plugins: postcssPluginCreator,
|
|
171
|
-
sourceMap: cssSourceMap
|
|
171
|
+
sourceMap: cssSourceMap
|
|
172
|
+
// Never use component css sourcemap when style optimizations are on.
|
|
173
|
+
// It will just increase bundle size without offering good debug experience.
|
|
174
|
+
&& !buildOptions.optimization.styles
|
|
175
|
+
// Inline all sourcemap types except hidden ones, which are the same as no sourcemaps
|
|
176
|
+
// for component css.
|
|
177
|
+
&& !buildOptions.sourceMap.hidden ? 'inline' : false,
|
|
172
178
|
},
|
|
173
179
|
},
|
|
174
180
|
...use,
|
|
@@ -100,7 +100,10 @@ async function augmentIndexHtml(params) {
|
|
|
100
100
|
const isNoModuleType = noModuleFiles.some(scriptPredictor);
|
|
101
101
|
const isModuleType = moduleFiles.some(scriptPredictor);
|
|
102
102
|
if (isNoModuleType && !isModuleType) {
|
|
103
|
-
attrs.push({ name: 'nomodule', value: null }
|
|
103
|
+
attrs.push({ name: 'nomodule', value: null });
|
|
104
|
+
if (!script.startsWith('polyfills-nomodule-es5')) {
|
|
105
|
+
attrs.push({ name: 'defer', value: null });
|
|
106
|
+
}
|
|
104
107
|
}
|
|
105
108
|
else if (isModuleType && !isNoModuleType) {
|
|
106
109
|
attrs.push({ name: 'type', value: 'module' });
|
|
@@ -16,7 +16,6 @@ import { Schema as BrowserBuilderSchema } from '../browser/schema';
|
|
|
16
16
|
import { ExecutionTransformer } from '../transforms';
|
|
17
17
|
import { Schema } from './schema';
|
|
18
18
|
export declare type DevServerBuilderOptions = Schema & json.JsonObject;
|
|
19
|
-
export declare const devServerBuildOverriddenKeys: (keyof DevServerBuilderOptions)[];
|
|
20
19
|
export declare type DevServerBuilderOutput = DevServerBuildOutput & {
|
|
21
20
|
baseUrl: string;
|
|
22
21
|
};
|
package/src/dev-server/index.js
CHANGED
|
@@ -27,7 +27,7 @@ const utils_1 = require("../utils");
|
|
|
27
27
|
const version_1 = require("../utils/version");
|
|
28
28
|
const webpack_browser_config_1 = require("../utils/webpack-browser-config");
|
|
29
29
|
const open = require('open');
|
|
30
|
-
|
|
30
|
+
const devServerBuildOverriddenKeys = [
|
|
31
31
|
'watch',
|
|
32
32
|
'optimization',
|
|
33
33
|
'aot',
|
|
@@ -62,7 +62,7 @@ function serveWebpackBrowser(options, context, transforms = {}) {
|
|
|
62
62
|
const rawBrowserOptions = await context.getTargetOptions(browserTarget);
|
|
63
63
|
// Override options we need to override, if defined.
|
|
64
64
|
const overrides = Object.keys(options)
|
|
65
|
-
.filter(key => options[key] !== undefined &&
|
|
65
|
+
.filter(key => options[key] !== undefined && devServerBuildOverriddenKeys.includes(key))
|
|
66
66
|
.reduce((previous, key) => ({
|
|
67
67
|
...previous,
|
|
68
68
|
[key]: options[key],
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"verbose": {
|
|
46
46
|
"type": "boolean",
|
|
47
|
-
"description": "Adds more details to output logging."
|
|
48
|
-
"default": false
|
|
47
|
+
"description": "Adds more details to output logging."
|
|
49
48
|
},
|
|
50
49
|
"liveReload": {
|
|
51
50
|
"type": "boolean",
|
|
@@ -117,7 +116,6 @@
|
|
|
117
116
|
},
|
|
118
117
|
"sourceMap": {
|
|
119
118
|
"description": "Output sourcemaps.",
|
|
120
|
-
"default": true,
|
|
121
119
|
"oneOf": [
|
|
122
120
|
{
|
|
123
121
|
"type": "object",
|
|
@@ -153,8 +151,7 @@
|
|
|
153
151
|
"vendorSourceMap": {
|
|
154
152
|
"type": "boolean",
|
|
155
153
|
"description": "Resolve vendor packages sourcemaps.",
|
|
156
|
-
"x-deprecated": true
|
|
157
|
-
"default": false
|
|
154
|
+
"x-deprecated": true
|
|
158
155
|
},
|
|
159
156
|
"evalSourceMap": {
|
|
160
157
|
"type": "boolean",
|