diff --git a/docs/uncompiled/artplayer/index.js b/docs/uncompiled/artplayer/index.js index 18d5f5ef4..119243021 100644 --- a/docs/uncompiled/artplayer/index.js +++ b/docs/uncompiled/artplayer/index.js @@ -6,7 +6,16 @@ // anything defined in a previous bundle is accessed via the // orig method which is the require for previous bundles -(function (modules, entry, mainEntry, parcelRequireName, globalName) { +(function ( + modules, + entry, + mainEntry, + parcelRequireName, + externals, + distDir, + publicUrl, + devServer +) { /* eslint-disable no-undef */ var globalObject = typeof globalThis !== 'undefined' @@ -25,6 +34,7 @@ typeof globalObject[parcelRequireName] === 'function' && globalObject[parcelRequireName]; + var importMap = previousRequire.i || {}; var cache = previousRequire.cache || {}; // Do not use `require` to prevent Webpack from trying to bundle this call var nodeRequire = @@ -35,6 +45,9 @@ function newRequire(name, jumped) { if (!cache[name]) { if (!modules[name]) { + if (externals[name]) { + return externals[name]; + } // if we cannot find the module within our internal map or // cache jump to the current global require ie. the last bundle // that was added to the page. @@ -73,7 +86,7 @@ localRequire, module, module.exports, - this + globalObject ); } @@ -93,6 +106,7 @@ function Module(moduleName) { this.id = moduleName; this.bundle = newRequire; + this.require = nodeRequire; this.exports = {}; } @@ -101,6 +115,10 @@ newRequire.modules = modules; newRequire.cache = cache; newRequire.parent = previousRequire; + newRequire.distDir = distDir; + newRequire.publicUrl = publicUrl; + newRequire.devServer = devServer; + newRequire.i = importMap; newRequire.register = function (id, exports) { modules[id] = [ function (require, module) { @@ -110,6 +128,10 @@ ]; }; + // Only insert newRequire.load when it is actually used. + // The code in this file is linted against ES5, so dynamic import is not allowed. + // INSERT_LOAD_HERE + Object.defineProperty(newRequire, 'root', { get: function () { return globalObject[parcelRequireName]; @@ -136,13 +158,9 @@ define(function () { return mainExports; }); - - //