Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
const { concat } = require('lodash');
const { Component } = require('./Component');
module.exports = class Autoload extends Component {
/** @type {Record} */
aliases = {};
/**
* Register the component.
*
* @param {Record} libs
* @return {void}
*/
register(libs) {
Object.keys(libs).forEach(library => {
concat([], libs[library]).forEach(alias => {
this.aliases[alias] = library.includes('.')
? library.split('.')
: library;
});
});
}
/**
* webpack plugins to be appended to the master config.
*/
webpackPlugins() {
const { ProvidePlugin } = require('webpack');
return [new ProvidePlugin(this.aliases)];
}
};