Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-loadable/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var fs = require('fs');
var path = require('path');
var url = require('url');
function buildManifest(compiler, compilation) {
var context = compiler.options.context;
var manifest = {};
compilation.chunks.forEach(function (chunk) {
chunk.files.forEach(function (file) {
chunk.forEachModule(function (module) {
var id = module.id;
var name = typeof module.libIdent === 'function' ? module.libIdent({ context: context }) : null;
var publicPath = url.resolve(compilation.outputOptions.publicPath || '', file);
var currentModule = module;
if (module.constructor.name === 'ConcatenatedModule') {
currentModule = module.rootModule;
}
if (!manifest[currentModule.rawRequest]) {
manifest[currentModule.rawRequest] = [];
}
manifest[currentModule.rawRequest].push({ id: id, name: name, file: file, publicPath: publicPath });
});
});
});
return manifest;
}
var ReactLoadablePlugin = function () {
function ReactLoadablePlugin() {
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, ReactLoadablePlugin);
this.filename = opts.filename;
}
ReactLoadablePlugin.prototype.apply = function apply(compiler) {
var _this = this;
compiler.plugin('emit', function (compilation, callback) {
var manifest = buildManifest(compiler, compilation);
var json = JSON.stringify(manifest, null, 2);
var outputDirectory = path.dirname(_this.filename);
try {
fs.mkdirSync(outputDirectory);
} catch (err) {
if (err.code !== 'EEXIST') {
throw err;
}
}
fs.writeFileSync(_this.filename, json);
callback();
});
};
return ReactLoadablePlugin;
}();
function getBundles(manifest, moduleIds) {
return moduleIds.reduce(function (bundles, moduleId) {
return bundles.concat(manifest[moduleId]);
}, []);
}
exports.ReactLoadablePlugin = ReactLoadablePlugin;
exports.getBundles = getBundles; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0154 ]-- |