@umijs/bundler-webpack 4.0.53 → 4.0.55
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/client/client/client.js +74 -82
- package/dist/build.d.ts +1 -1
- package/dist/build.js +12 -15
- package/dist/config/compressPlugin.js +4 -0
- package/dist/dev.d.ts +1 -1
- package/dist/dev.js +5 -3
- package/dist/plugins/EsbuildMinifyFix.d.ts +7 -0
- package/dist/plugins/EsbuildMinifyFix.js +116 -0
- package/dist/types.d.ts +3 -2
- package/package.json +12 -12
package/client/client/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import stripAnsi from '@umijs/utils/compiled/strip-ansi';
|
|
@@ -35,25 +35,23 @@ socket.addEventListener('message', /*#__PURE__*/function () {
|
|
|
35
35
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
36
36
|
var data;
|
|
37
37
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
|
-
while (1) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return _context.stop();
|
|
56
|
-
}
|
|
38
|
+
while (1) switch (_context.prev = _context.next) {
|
|
39
|
+
case 0:
|
|
40
|
+
data = _ref.data;
|
|
41
|
+
data = JSON.parse(data);
|
|
42
|
+
if (data.type === 'connected') {
|
|
43
|
+
console.log("[webpack] connected.");
|
|
44
|
+
// proxy(nginx, docker) hmr ws maybe caused timeout,
|
|
45
|
+
// so send ping package let ws keep alive.
|
|
46
|
+
pingTimer = window.setInterval(function () {
|
|
47
|
+
return socket.send('ping');
|
|
48
|
+
}, 30000);
|
|
49
|
+
} else {
|
|
50
|
+
handleMessage(data).catch(console.error);
|
|
51
|
+
}
|
|
52
|
+
case 3:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context.stop();
|
|
57
55
|
}
|
|
58
56
|
}, _callee);
|
|
59
57
|
}));
|
|
@@ -69,34 +67,32 @@ function _waitForSuccessfulPing() {
|
|
|
69
67
|
var ms,
|
|
70
68
|
_args3 = arguments;
|
|
71
69
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
72
|
-
while (1) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_context3.next = 14;
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
_context3.prev = 2;
|
|
82
|
-
_context3.next = 5;
|
|
83
|
-
return fetch(pingUrl);
|
|
84
|
-
case 5:
|
|
85
|
-
return _context3.abrupt("break", 14);
|
|
86
|
-
case 8:
|
|
87
|
-
_context3.prev = 8;
|
|
88
|
-
_context3.t0 = _context3["catch"](2);
|
|
89
|
-
_context3.next = 12;
|
|
90
|
-
return new Promise(function (resolve) {
|
|
91
|
-
return setTimeout(resolve, ms);
|
|
92
|
-
});
|
|
93
|
-
case 12:
|
|
94
|
-
_context3.next = 1;
|
|
70
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
71
|
+
case 0:
|
|
72
|
+
ms = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : 1000;
|
|
73
|
+
case 1:
|
|
74
|
+
if (!true) {
|
|
75
|
+
_context3.next = 14;
|
|
95
76
|
break;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
}
|
|
78
|
+
_context3.prev = 2;
|
|
79
|
+
_context3.next = 5;
|
|
80
|
+
return fetch(pingUrl);
|
|
81
|
+
case 5:
|
|
82
|
+
return _context3.abrupt("break", 14);
|
|
83
|
+
case 8:
|
|
84
|
+
_context3.prev = 8;
|
|
85
|
+
_context3.t0 = _context3["catch"](2);
|
|
86
|
+
_context3.next = 12;
|
|
87
|
+
return new Promise(function (resolve) {
|
|
88
|
+
return setTimeout(resolve, ms);
|
|
89
|
+
});
|
|
90
|
+
case 12:
|
|
91
|
+
_context3.next = 1;
|
|
92
|
+
break;
|
|
93
|
+
case 14:
|
|
94
|
+
case "end":
|
|
95
|
+
return _context3.stop();
|
|
100
96
|
}
|
|
101
97
|
}, _callee3, null, [[2, 8]]);
|
|
102
98
|
}));
|
|
@@ -104,19 +100,17 @@ function _waitForSuccessfulPing() {
|
|
|
104
100
|
}
|
|
105
101
|
socket.addEventListener('close', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
106
102
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
107
|
-
while (1) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return _context2.stop();
|
|
119
|
-
}
|
|
103
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
104
|
+
case 0:
|
|
105
|
+
if (pingTimer) clearInterval(pingTimer);
|
|
106
|
+
console.info('[webpack] Dev server disconnected. Polling for restart...');
|
|
107
|
+
_context2.next = 4;
|
|
108
|
+
return waitForSuccessfulPing();
|
|
109
|
+
case 4:
|
|
110
|
+
location.reload();
|
|
111
|
+
case 5:
|
|
112
|
+
case "end":
|
|
113
|
+
return _context2.stop();
|
|
120
114
|
}
|
|
121
115
|
}, _callee2);
|
|
122
116
|
})));
|
|
@@ -268,28 +262,26 @@ function handleMessage(_x2) {
|
|
|
268
262
|
function _handleMessage() {
|
|
269
263
|
_handleMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(payload) {
|
|
270
264
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
271
|
-
while (1) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return _context4.stop();
|
|
292
|
-
}
|
|
265
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
266
|
+
case 0:
|
|
267
|
+
_context4.t0 = payload.type;
|
|
268
|
+
_context4.next = _context4.t0 === MESSAGE_TYPE.hash ? 3 : _context4.t0 === MESSAGE_TYPE.stillOk ? 5 : _context4.t0 === MESSAGE_TYPE.ok ? 5 : _context4.t0 === MESSAGE_TYPE.errors ? 7 : _context4.t0 === MESSAGE_TYPE.warnings ? 9 : 11;
|
|
269
|
+
break;
|
|
270
|
+
case 3:
|
|
271
|
+
handleAvailableHash(payload.data);
|
|
272
|
+
return _context4.abrupt("break", 11);
|
|
273
|
+
case 5:
|
|
274
|
+
handleSuccess();
|
|
275
|
+
return _context4.abrupt("break", 11);
|
|
276
|
+
case 7:
|
|
277
|
+
handleErrors(payload.data);
|
|
278
|
+
return _context4.abrupt("break", 11);
|
|
279
|
+
case 9:
|
|
280
|
+
handleWarnings(payload.data);
|
|
281
|
+
return _context4.abrupt("break", 11);
|
|
282
|
+
case 11:
|
|
283
|
+
case "end":
|
|
284
|
+
return _context4.stop();
|
|
293
285
|
}
|
|
294
286
|
}, _callee4);
|
|
295
287
|
}));
|
package/dist/build.d.ts
CHANGED
package/dist/build.js
CHANGED
|
@@ -35,14 +35,16 @@ module.exports = __toCommonJS(build_exports);
|
|
|
35
35
|
var import_utils = require("@umijs/utils");
|
|
36
36
|
var import_path = require("path");
|
|
37
37
|
var import_webpack = __toESM(require("../compiled/webpack"));
|
|
38
|
-
var import_config = require("./config/config");
|
|
39
38
|
var import_types = require("./types");
|
|
39
|
+
var configModule = (0, import_utils.importLazy)(
|
|
40
|
+
require.resolve("./config/config")
|
|
41
|
+
);
|
|
40
42
|
async function build(opts) {
|
|
41
43
|
const cacheDirectoryPath = (0, import_path.resolve)(
|
|
42
44
|
opts.rootDir || opts.cwd,
|
|
43
45
|
opts.config.cacheDirectoryPath || "node_modules/.cache"
|
|
44
46
|
);
|
|
45
|
-
const webpackConfig = await
|
|
47
|
+
const webpackConfig = await configModule.getConfig({
|
|
46
48
|
cwd: opts.cwd,
|
|
47
49
|
rootDir: opts.rootDir,
|
|
48
50
|
env: import_types.Env.production,
|
|
@@ -74,26 +76,21 @@ async function build(opts) {
|
|
|
74
76
|
}
|
|
75
77
|
const compiler = (0, import_webpack.default)(webpackConfig);
|
|
76
78
|
let closeWatching;
|
|
77
|
-
const handler = (err, stats) => {
|
|
79
|
+
const handler = async (err, stats) => {
|
|
78
80
|
var _a;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
const validErr = err || ((stats == null ? void 0 : stats.hasErrors()) ? new Error(stats.toString("errors-only")) : null);
|
|
82
|
+
await ((_a = opts.onBuildComplete) == null ? void 0 : _a.call(opts, {
|
|
83
|
+
err: validErr,
|
|
81
84
|
stats,
|
|
82
85
|
isFirstCompile,
|
|
83
86
|
time: stats ? stats.endTime - stats.startTime : null,
|
|
84
87
|
// pass close function to close watching
|
|
85
88
|
...opts.watch ? { close: closeWatching } : {}
|
|
86
|
-
});
|
|
89
|
+
}));
|
|
87
90
|
isFirstCompile = false;
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
if (stats) {
|
|
93
|
-
const errorMsg = stats.toString("errors-only");
|
|
94
|
-
esbuildCompressErrorHelper(errorMsg);
|
|
95
|
-
reject(new Error(errorMsg));
|
|
96
|
-
}
|
|
91
|
+
if (validErr) {
|
|
92
|
+
(stats == null ? void 0 : stats.hasErrors()) && esbuildCompressErrorHelper(validErr.toString());
|
|
93
|
+
reject(validErr);
|
|
97
94
|
} else {
|
|
98
95
|
resolve2(stats);
|
|
99
96
|
}
|
|
@@ -34,6 +34,7 @@ __export(compressPlugin_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(compressPlugin_exports);
|
|
35
35
|
var import_css_minimizer_webpack_plugin = __toESM(require("@umijs/bundler-webpack/compiled/css-minimizer-webpack-plugin"));
|
|
36
36
|
var import_terser_webpack_plugin = __toESM(require("../../compiled/terser-webpack-plugin"));
|
|
37
|
+
var import_EsbuildMinifyFix = require("../plugins/EsbuildMinifyFix");
|
|
37
38
|
var import_types = require("../types");
|
|
38
39
|
var import_getEsBuildTarget = require("../utils/getEsBuildTarget");
|
|
39
40
|
async function addCompressPlugin(opts) {
|
|
@@ -61,6 +62,9 @@ async function addCompressPlugin(opts) {
|
|
|
61
62
|
// remove all comments
|
|
62
63
|
legalComments: "none"
|
|
63
64
|
};
|
|
65
|
+
if (userConfig.esbuildMinifyIIFE) {
|
|
66
|
+
config.plugin("EsbuildMinifyFix").use(import_EsbuildMinifyFix.EsbuildMinifyFix);
|
|
67
|
+
}
|
|
64
68
|
} else if (jsMinifier === import_types.JSMinifier.terser) {
|
|
65
69
|
minify = import_terser_webpack_plugin.default.terserMinify;
|
|
66
70
|
terserOptions = {
|
package/dist/dev.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { MFSU } from '@umijs/mfsu';
|
|
3
3
|
import type { Worker } from 'worker_threads';
|
|
4
4
|
import webpack from '../compiled/webpack';
|
|
5
|
-
import { IOpts as IConfigOpts } from './config/config';
|
|
5
|
+
import type { IOpts as IConfigOpts } from './config/config';
|
|
6
6
|
import { IConfig } from './types';
|
|
7
7
|
declare type IOpts = {
|
|
8
8
|
afterMiddlewares?: any[];
|
package/dist/dev.js
CHANGED
|
@@ -39,10 +39,12 @@ var import_utils = require("@umijs/utils");
|
|
|
39
39
|
var import_fs = require("fs");
|
|
40
40
|
var import_path = require("path");
|
|
41
41
|
var import_webpack = __toESM(require("../compiled/webpack"));
|
|
42
|
-
var import_config = require("./config/config");
|
|
43
42
|
var import_constants = require("./constants");
|
|
44
43
|
var import_server = require("./server/server");
|
|
45
44
|
var import_types = require("./types");
|
|
45
|
+
var configModule = (0, import_utils.importLazy)(
|
|
46
|
+
require.resolve("./config/config")
|
|
47
|
+
);
|
|
46
48
|
function ensureSerializableValue(obj) {
|
|
47
49
|
return JSON.parse(
|
|
48
50
|
JSON.stringify(
|
|
@@ -118,7 +120,7 @@ async function setup(opts) {
|
|
|
118
120
|
cwd: opts.cwd
|
|
119
121
|
});
|
|
120
122
|
}
|
|
121
|
-
const webpackConfig = await
|
|
123
|
+
const webpackConfig = await configModule.getConfig({
|
|
122
124
|
cwd: opts.cwd,
|
|
123
125
|
rootDir: opts.rootDir,
|
|
124
126
|
env: import_types.Env.development,
|
|
@@ -149,7 +151,7 @@ async function setup(opts) {
|
|
|
149
151
|
} : void 0,
|
|
150
152
|
pkg: opts.pkg
|
|
151
153
|
});
|
|
152
|
-
const depConfig = await
|
|
154
|
+
const depConfig = await configModule.getConfig({
|
|
153
155
|
cwd: opts.cwd,
|
|
154
156
|
rootDir: opts.rootDir,
|
|
155
157
|
env: import_types.Env.development,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Compilation, Compiler, sources } from '../../compiled/webpack';
|
|
2
|
+
export declare class EsbuildMinifyFix {
|
|
3
|
+
private name;
|
|
4
|
+
constructor();
|
|
5
|
+
apply(compiler: Compiler): void;
|
|
6
|
+
minifyFix(compilation: Compilation, assets: Record<string, sources.Source>): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plugins/EsbuildMinifyFix.ts
|
|
20
|
+
var EsbuildMinifyFix_exports = {};
|
|
21
|
+
__export(EsbuildMinifyFix_exports, {
|
|
22
|
+
EsbuildMinifyFix: () => EsbuildMinifyFix
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(EsbuildMinifyFix_exports);
|
|
25
|
+
var import_utils = require("@umijs/utils");
|
|
26
|
+
var import_webpack = require("../../compiled/webpack");
|
|
27
|
+
var JS_FILE_REG = /\.(js|mjs|cjs)$/;
|
|
28
|
+
var EsbuildMinifyFix = class {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.name = `EsbuildMinifyFix`;
|
|
31
|
+
}
|
|
32
|
+
apply(compiler) {
|
|
33
|
+
compiler.hooks.compilation.tap(this.name, (compilation) => {
|
|
34
|
+
compilation.hooks.processAssets.tapPromise(
|
|
35
|
+
{
|
|
36
|
+
name: this.name,
|
|
37
|
+
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING,
|
|
38
|
+
additionalAssets: true
|
|
39
|
+
},
|
|
40
|
+
(assets) => this.minifyFix(compilation, assets)
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async minifyFix(compilation, assets) {
|
|
45
|
+
const matchObject = import_webpack.ModuleFilenameHelpers.matchObject.bind(void 0, {
|
|
46
|
+
include: [JS_FILE_REG]
|
|
47
|
+
});
|
|
48
|
+
const assetsForMinify = await Promise.all(
|
|
49
|
+
Object.keys(assets).filter((name) => {
|
|
50
|
+
if (!matchObject(name)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const { info } = compilation.getAsset(name) || {};
|
|
54
|
+
if (!(info == null ? void 0 : info.minimized)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (info == null ? void 0 : info.EsbuildMinifyFix) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}).map(async (name) => {
|
|
62
|
+
const { info, source } = compilation.getAsset(name);
|
|
63
|
+
return { name, info, inputSource: source };
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
if (assetsForMinify.length === 0) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const { SourceMapSource, RawSource } = import_webpack.sources;
|
|
70
|
+
for (const asset of assetsForMinify) {
|
|
71
|
+
const { name, inputSource } = asset;
|
|
72
|
+
const { source, map } = inputSource.sourceAndMap();
|
|
73
|
+
const originCode = source.toString();
|
|
74
|
+
let newCode = originCode;
|
|
75
|
+
if (!newCode.startsWith('"use strict";(self.') && !newCode.startsWith('(function(){"use strict";') && !newCode.startsWith("(self.webpack")) {
|
|
76
|
+
const bundle = new import_utils.MagicString(newCode);
|
|
77
|
+
bundle.indent().prepend("!(function () {\n").append("}());");
|
|
78
|
+
newCode = bundle.toString();
|
|
79
|
+
const output = {};
|
|
80
|
+
if (map) {
|
|
81
|
+
const bundleMap = bundle.generateMap({
|
|
82
|
+
source: name,
|
|
83
|
+
file: `${name}.map`,
|
|
84
|
+
includeContent: true,
|
|
85
|
+
hires: true
|
|
86
|
+
});
|
|
87
|
+
const originMapAsString = JSON.stringify(map);
|
|
88
|
+
const mergedMap = (0, import_utils.remapping)(JSON.stringify(bundleMap), (file) => {
|
|
89
|
+
if (file === name) {
|
|
90
|
+
return originMapAsString;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
});
|
|
94
|
+
output.source = new SourceMapSource(
|
|
95
|
+
newCode,
|
|
96
|
+
name,
|
|
97
|
+
mergedMap,
|
|
98
|
+
originCode,
|
|
99
|
+
map,
|
|
100
|
+
true
|
|
101
|
+
);
|
|
102
|
+
} else {
|
|
103
|
+
output.source = new RawSource(newCode);
|
|
104
|
+
}
|
|
105
|
+
compilation.updateAsset(name, output.source, {
|
|
106
|
+
...asset.info,
|
|
107
|
+
EsbuildMinifyFix: true
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
+
0 && (module.exports = {
|
|
115
|
+
EsbuildMinifyFix
|
|
116
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Options as SwcConfig } from '@swc/core';
|
|
2
2
|
import type { HttpsServerOptions, ProxyOptions } from '@umijs/bundler-utils';
|
|
3
|
-
import webpack, { Configuration } from '../compiled/webpack';
|
|
4
|
-
import Config from '../compiled/webpack-5-chain';
|
|
5
3
|
import type { TransformOptions as EsbuildOptions } from '@umijs/bundler-utils/compiled/esbuild';
|
|
6
4
|
import type { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
|
5
|
+
import webpack, { Configuration } from '../compiled/webpack';
|
|
6
|
+
import Config from '../compiled/webpack-5-chain';
|
|
7
7
|
export declare enum Env {
|
|
8
8
|
development = "development",
|
|
9
9
|
production = "production"
|
|
@@ -121,6 +121,7 @@ export interface IConfig {
|
|
|
121
121
|
writeToDisk?: boolean;
|
|
122
122
|
babelLoaderCustomize?: string;
|
|
123
123
|
analyze?: BundleAnalyzerPlugin.Options;
|
|
124
|
+
esbuildMinifyIIFE?: boolean;
|
|
124
125
|
[key: string]: any;
|
|
125
126
|
}
|
|
126
127
|
export interface ISrcTranspilerOpts {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-webpack",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.55",
|
|
4
4
|
"description": "@umijs/bundler-webpack",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-webpack#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -28,22 +28,22 @@
|
|
|
28
28
|
"test": "umi-scripts jest-turbo"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pmmmwh/react-refresh-webpack-plugin": "0.5.
|
|
32
|
-
"@svgr/core": "6.
|
|
33
|
-
"@svgr/plugin-jsx": "^6.
|
|
34
|
-
"@svgr/plugin-svgo": "^6.
|
|
31
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
32
|
+
"@svgr/core": "6.5.1",
|
|
33
|
+
"@svgr/plugin-jsx": "^6.5.1",
|
|
34
|
+
"@svgr/plugin-svgo": "^6.5.1",
|
|
35
35
|
"@types/hapi__joi": "17.1.9",
|
|
36
|
-
"@umijs/babel-preset-umi": "4.0.
|
|
37
|
-
"@umijs/bundler-utils": "4.0.
|
|
36
|
+
"@umijs/babel-preset-umi": "4.0.55",
|
|
37
|
+
"@umijs/bundler-utils": "4.0.55",
|
|
38
38
|
"@umijs/case-sensitive-paths-webpack-plugin": "^1.0.1",
|
|
39
|
-
"@umijs/mfsu": "4.0.
|
|
40
|
-
"@umijs/utils": "4.0.
|
|
39
|
+
"@umijs/mfsu": "4.0.55",
|
|
40
|
+
"@umijs/utils": "4.0.55",
|
|
41
41
|
"cors": "^2.8.5",
|
|
42
42
|
"css-loader": "6.7.1",
|
|
43
|
-
"es5-imcompatible-versions": "^0.1.
|
|
43
|
+
"es5-imcompatible-versions": "^0.1.78",
|
|
44
44
|
"fork-ts-checker-webpack-plugin": "7.3.0",
|
|
45
|
-
"jest-worker": "29.3
|
|
46
|
-
"lightningcss": "1.
|
|
45
|
+
"jest-worker": "29.4.3",
|
|
46
|
+
"lightningcss": "1.19.0",
|
|
47
47
|
"node-libs-browser": "2.2.1",
|
|
48
48
|
"postcss": "^8.4.21",
|
|
49
49
|
"postcss-preset-env": "7.5.0",
|