@angular-devkit/build-webpack 0.1702.0-next.1 → 0.1702.0
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,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@angular-devkit/build-webpack",
|
3
|
-
"version": "0.1702.0
|
3
|
+
"version": "0.1702.0",
|
4
4
|
"description": "Webpack Builder for Architect",
|
5
5
|
"experimental": true,
|
6
6
|
"main": "src/index.js",
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"./*.js": "./*.js"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
|
-
"@angular-devkit/architect": "0.1702.0
|
19
|
+
"@angular-devkit/architect": "0.1702.0",
|
20
20
|
"rxjs": "7.8.1"
|
21
21
|
},
|
22
22
|
"peerDependencies": {
|
@@ -17,7 +17,12 @@ const rxjs_1 = require("rxjs");
|
|
17
17
|
const webpack_1 = __importDefault(require("webpack"));
|
18
18
|
const utils_1 = require("../../utils");
|
19
19
|
function runWebpack(config, context, options = {}) {
|
20
|
-
const { logging: log = (stats, config) =>
|
20
|
+
const { logging: log = (stats, config) => {
|
21
|
+
if (config.stats !== false) {
|
22
|
+
const statsOptions = config.stats === true ? undefined : config.stats;
|
23
|
+
context.logger.info(stats.toString(statsOptions));
|
24
|
+
}
|
25
|
+
}, shouldProvideStats = true, } = options;
|
21
26
|
const createWebpack = (c) => {
|
22
27
|
if (options.webpackFactory) {
|
23
28
|
const result = options.webpackFactory(c);
|
@@ -38,8 +38,12 @@ function runWebpackDevServer(config, context, options = {}) {
|
|
38
38
|
}
|
39
39
|
return new webpack_dev_server_1.default(config, webpack);
|
40
40
|
};
|
41
|
-
const log =
|
42
|
-
|
41
|
+
const { logging: log = (stats, config) => {
|
42
|
+
if (config.stats !== false) {
|
43
|
+
const statsOptions = config.stats === true ? undefined : config.stats;
|
44
|
+
context.logger.info(stats.toString(statsOptions));
|
45
|
+
}
|
46
|
+
}, shouldProvideStats = true, } = options;
|
43
47
|
return createWebpack({ ...config, watch: false }).pipe((0, rxjs_1.switchMap)((webpackCompiler) => new rxjs_1.Observable((obs) => {
|
44
48
|
const devServerConfig = options.devServerConfig || config.devServer || {};
|
45
49
|
devServerConfig.host ??= 'localhost';
|