@@ -54,7 +54,7 @@ module.exports = JSON.parse("{\"name\":\"terser\",\"description\":\"JavaScript p
5454/***/ (function(module) {
5555
5656"use strict";
57- module.exports = {"i8":"5.51.0 "};
57+ module.exports = {"i8":"5.51.1 "};
5858
5959/***/ }),
6060
@@ -53636,7 +53636,7 @@ const NormalModule = __webpack_require__(88376);
5363653636const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(5426);
5363753637const JavascriptModulesPlugin = __webpack_require__(80867);
5363853638const ConcatenatedModule = __webpack_require__(74233);
53639- const { absolutify } = __webpack_require__(47779);
53639+ const { makePathsAbsolute } = __webpack_require__(47779);
5364053640
5364153641/** @typedef {import("webpack-sources").Source} Source */
5364253642/** @typedef {import("../declarations/WebpackOptions").DevTool} DevToolOptions */
@@ -53750,7 +53750,7 @@ class EvalSourceMapDevToolPlugin {
5375053750 const root = compiler.root;
5375153751 const modules = sourceMap.sources.map(source => {
5375253752 if (!source.startsWith("webpack://")) return source;
53753- source = absolutify (context, source.slice(10), root);
53753+ source = makePathsAbsolute (context, source.slice(10), root);
5375453754 const module = compilation.findModule(source);
5375553755 return module || source;
5375653756 });
@@ -57253,6 +57253,7 @@ const getManagedItem = (managedPath, path) => {
5725357253 */
5725457254const getResolvedTimestamp = entry => {
5725557255 if (entry === "ignore") return undefined;
57256+ if (entry === null) return null;
5725657257 if (entry.resolved !== undefined) return entry.resolved;
5725757258 return entry.symlinks === undefined ? entry : undefined;
5725857259};
@@ -57262,6 +57263,7 @@ const getResolvedTimestamp = entry => {
5726257263 * @returns {string | undefined} the resolved entry
5726357264 */
5726457265const getResolvedHash = entry => {
57266+ if (entry === null) return null;
5726557267 if (entry.resolved !== undefined) return entry.resolved;
5726657268 return entry.symlinks === undefined ? entry.hash : undefined;
5726757269};
@@ -67616,7 +67618,11 @@ const {
6761667618} = __webpack_require__(21699);
6761767619const createHash = __webpack_require__(34627);
6761867620const { join } = __webpack_require__(71593);
67619- const { contextify, absolutify } = __webpack_require__(47779);
67621+ const {
67622+ contextify,
67623+ absolutify,
67624+ makePathsRelative
67625+ } = __webpack_require__(47779);
6762067626const makeSerializable = __webpack_require__(55575);
6762167627const memoize = __webpack_require__(18003);
6762267628
@@ -67680,7 +67686,11 @@ const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/;
6768067686 */
6768167687const contextifySourceUrl = (context, source, associatedObjectForCache) => {
6768267688 if (source.startsWith("webpack://")) return source;
67683- return `webpack://${contextify(context, source, associatedObjectForCache)}`;
67689+ return `webpack://${makePathsRelative(
67690+ context,
67691+ source,
67692+ associatedObjectForCache
67693+ )}`;
6768467694};
6768567695
6768667696/**
@@ -73764,7 +73774,7 @@ const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(5426);
7376473774const createSchemaValidation = __webpack_require__(32797);
7376573775const createHash = __webpack_require__(34627);
7376673776const { relative, dirname } = __webpack_require__(71593);
73767- const { absolutify } = __webpack_require__(47779);
73777+ const { makePathsAbsolute } = __webpack_require__(47779);
7376873778
7376973779/** @typedef {import("webpack-sources").MapOptions} MapOptions */
7377073780/** @typedef {import("webpack-sources").Source} Source */
@@ -73841,7 +73851,7 @@ const getTaskForFile = (
7384173851 if (!sourceMap || typeof source !== "string") return;
7384273852 const context = compilation.options.context;
7384373853 const root = compilation.compiler.root;
73844- const cachedAbsolutify = absolutify .bindContextCache(context, root);
73854+ const cachedAbsolutify = makePathsAbsolute .bindContextCache(context, root);
7384573855 const modules = sourceMap.sources.map(source => {
7384673856 if (!source.startsWith("webpack://")) return source;
7384773857 source = cachedAbsolutify(source.slice(10));
@@ -111425,6 +111435,10 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
111425111435 const result = new ConcatSource(source);
111426111436 const exportsInfo = moduleGraph.getExportsInfo(module);
111427111437 const exports = [];
111438+ const isAsync = moduleGraph.isAsync(module);
111439+ if (isAsync) {
111440+ result.add(`__webpack_exports__ = await __webpack_exports__;\n`);
111441+ }
111428111442 for (const exportInfo of exportsInfo.orderedExports) {
111429111443 if (!exportInfo.provided) continue;
111430111444 const varName = `__webpack_exports__${Template.toIdentifier(
@@ -114347,7 +114361,7 @@ const { equals } = __webpack_require__(92459);
114347114361const LazySet = __webpack_require__(60248);
114348114362const { concatComparators, keepOriginalOrder } = __webpack_require__(21699);
114349114363const createHash = __webpack_require__(34627);
114350- const contextify = __webpack_require__(47779).contextify ;
114364+ const { makePathsRelative } = __webpack_require__(47779);
114351114365const makeSerializable = __webpack_require__(55575);
114352114366const propertyAccess = __webpack_require__(44682);
114353114367const {
@@ -115335,13 +115349,13 @@ class ConcatenatedModule extends Module {
115335115349 }
115336115350
115337115351 static _createIdentifier(rootModule, modules, associatedObjectForCache) {
115338- const cachedContextify = contextify .bindContextCache(
115352+ const cachedMakePathsRelative = makePathsRelative .bindContextCache(
115339115353 rootModule.context,
115340115354 associatedObjectForCache
115341115355 );
115342115356 let identifiers = [];
115343115357 for (const module of modules) {
115344- identifiers.push(cachedContextify (module.identifier()));
115358+ identifiers.push(cachedMakePathsRelative (module.identifier()));
115345115359 }
115346115360 identifiers.sort();
115347115361 const hash = createHash("md4");
@@ -140356,6 +140370,13 @@ const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
140356140370 * @property {Map<string, Map<string, string>>=} relativePaths
140357140371 */
140358140372
140373+ const relativePathToRequest = relativePath => {
140374+ if (relativePath === "") return "./.";
140375+ if (relativePath === "..") return "../.";
140376+ if (relativePath.startsWith("../")) return relativePath;
140377+ return `./${relativePath}`;
140378+ };
140379+
140359140380/**
140360140381 * @param {string} context context for relative path
140361140382 * @param {string} maybeAbsolutePath path to make relative
@@ -140377,10 +140398,7 @@ const absoluteToRequest = (context, maybeAbsolutePath) => {
140377140398 querySplitPos === -1
140378140399 ? maybeAbsolutePath
140379140400 : maybeAbsolutePath.slice(0, querySplitPos);
140380- resource = path.posix.relative(context, resource);
140381- if (!resource.startsWith("../")) {
140382- resource = "./" + resource;
140383- }
140401+ resource = relativePathToRequest(path.posix.relative(context, resource));
140384140402 return querySplitPos === -1
140385140403 ? resource
140386140404 : resource + maybeAbsolutePath.slice(querySplitPos);
@@ -140394,10 +140412,9 @@ const absoluteToRequest = (context, maybeAbsolutePath) => {
140394140412 : maybeAbsolutePath.slice(0, querySplitPos);
140395140413 resource = path.win32.relative(context, resource);
140396140414 if (!WINDOWS_ABS_PATH_REGEXP.test(resource)) {
140397- resource = resource.replace(WINDOWS_PATH_SEPARATOR_REGEXP, "/");
140398- if (!resource.startsWith("../")) {
140399- resource = "./" + resource;
140400- }
140415+ resource = relativePathToRequest(
140416+ resource.replace(WINDOWS_PATH_SEPARATOR_REGEXP, "/")
140417+ );
140401140418 }
140402140419 return querySplitPos === -1
140403140420 ? resource
@@ -140555,6 +140572,21 @@ const _makePathsRelative = (context, identifier) => {
140555140572
140556140573exports.makePathsRelative = makeCacheable(_makePathsRelative);
140557140574
140575+ /**
140576+ *
140577+ * @param {string} context context for relative path
140578+ * @param {string} identifier identifier for path
140579+ * @returns {string} a converted relative path
140580+ */
140581+ const _makePathsAbsolute = (context, identifier) => {
140582+ return identifier
140583+ .split(SEGMENTS_SPLIT_REGEXP)
140584+ .map(str => requestToAbsolute(context, str))
140585+ .join("");
140586+ };
140587+
140588+ exports.makePathsAbsolute = makeCacheable(_makePathsAbsolute);
140589+
140558140590/**
140559140591 * @param {string} context absolute context path
140560140592 * @param {string} request any request string may containing absolute paths, query string, etc.
0 commit comments