weboptimizer 2.0.1416 → 2.0.1417
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 +1 -1
- package/type.d.ts +3 -2
- package/webpackConfigurator.js +5 -3
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -255,12 +255,13 @@ export interface ResolvedConfiguration {
|
|
|
255
255
|
contextType: string;
|
|
256
256
|
debug: boolean;
|
|
257
257
|
development: {
|
|
258
|
-
server: WebpackOptionsNormalized['devServer'] & {
|
|
258
|
+
server: (WebpackOptionsNormalized['devServer'] & {
|
|
259
|
+
hot: boolean;
|
|
259
260
|
host: string;
|
|
260
261
|
https: boolean;
|
|
261
262
|
liveReload: boolean;
|
|
262
263
|
port: number;
|
|
263
|
-
};
|
|
264
|
+
});
|
|
264
265
|
tool: WebpackOptionsNormalized['devtool'];
|
|
265
266
|
};
|
|
266
267
|
document: PlainObject;
|
package/webpackConfigurator.js
CHANGED
|
@@ -38,8 +38,10 @@ var _ejsLoader = _interopRequireDefault(require("./ejsLoader"));
|
|
|
38
38
|
var _optionalRequire,
|
|
39
39
|
_this = void 0,
|
|
40
40
|
_configuration$path$c,
|
|
41
|
+
_configuration$cache$,
|
|
41
42
|
_configuration$cache,
|
|
42
43
|
_configuration$cache2,
|
|
44
|
+
_configuration$cache3,
|
|
43
45
|
_configuration$path$c2;
|
|
44
46
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45
47
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1076,7 +1078,7 @@ if (configuration.files.compose.cascadingStyleSheet && plugins.MiniCSSExtract) {
|
|
|
1076
1078
|
So we inject live reload and hot module replacement manually.
|
|
1077
1079
|
*/
|
|
1078
1080
|
if (htmlAvailable && configuration.debug && configuration.development.server.liveReload && !configuration.injection.entry.normalized.developmentHandler && ['serve', 'test:browser'].includes(configuration.givenCommandLineArguments[2])) {
|
|
1079
|
-
configuration.injection.entry.normalized.developmentHandler = ['webpack-dev-server/client/index.js?live-reload=true
|
|
1081
|
+
configuration.injection.entry.normalized.developmentHandler = ['webpack-dev-server/client/index.js?' + 'live-reload=' + (configuration.development.server.liveReload ? 'true' : 'false') + "&hot=".concat(configuration.development.server.hot ? 'true' : 'false') + "&http".concat(configuration.development.server.https ? 's' : '', "://") + "".concat(configuration.development.server.host, ":") + "".concat(configuration.development.server.port)];
|
|
1080
1082
|
if (configuration.development.server.hot) {
|
|
1081
1083
|
configuration.injection.entry.normalized.developmentHandler.push('webpack/hot/dev-server.js');
|
|
1082
1084
|
configuration.development.server.hot = false;
|
|
@@ -1153,7 +1155,7 @@ var webpackConfiguration = exports.webpackConfiguration = _clientnode["default"]
|
|
|
1153
1155
|
mainFiles: configuration["package"].main.fileNames,
|
|
1154
1156
|
modules: _helper["default"].normalizePaths(_module.directoryNames),
|
|
1155
1157
|
symlinks: _module.resolveSymlinks,
|
|
1156
|
-
unsafeCache: Boolean((_configuration$cache = configuration.cache) === null || _configuration$cache === void 0 ? void 0 : _configuration$cache.unsafe)
|
|
1158
|
+
unsafeCache: Boolean((_configuration$cache$ = (_configuration$cache = configuration.cache) === null || _configuration$cache === void 0 ? void 0 : _configuration$cache.unsafe) !== null && _configuration$cache$ !== void 0 ? _configuration$cache$ : (_configuration$cache2 = configuration.cache) === null || _configuration$cache2 === void 0 ? void 0 : _configuration$cache2.main)
|
|
1157
1159
|
},
|
|
1158
1160
|
resolveLoader: {
|
|
1159
1161
|
alias: configuration.loader.aliases,
|
|
@@ -1229,7 +1231,7 @@ var webpackConfiguration = exports.webpackConfiguration = _clientnode["default"]
|
|
|
1229
1231
|
}
|
|
1230
1232
|
})),
|
|
1231
1233
|
plugins: pluginInstances
|
|
1232
|
-
}, (_configuration$
|
|
1234
|
+
}, (_configuration$cache3 = configuration.cache) !== null && _configuration$cache3 !== void 0 && _configuration$cache3.main ? {
|
|
1233
1235
|
cache: configuration.cache.main
|
|
1234
1236
|
} : {}, configuration.webpack, customConfiguration);
|
|
1235
1237
|
if (configuration.nodeENV !== null) webpackConfiguration.optimization.nodeEnv = configuration.nodeENV;
|