MOON
Server: Apache
System: Linux 54-179-220-51.cprapid.com 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User: thehunarfound (1001)
PHP: 7.4.29
Disabled: NONE
Upload Files
File: /home/thehunarfound/public_html/DMS/node_modules/laravel-mix/src/builder/webpack-entry.js
let Entry = require('./Entry');
let entry;


// We'll start by filtering through all the JS compilation
// requests from the user, and building up the main entry
// object for Webpack.
function addScripts() {
    if (Config.js.length) {
        Config.js.forEach(js => {
            entry.addFromOutput(
                js.entry.map(file => file.path()),
                js.output,
                js.entry[0]
            );
        });
    } else {
        entry.addDefault();
    }
}


// Next, we'll append any requested vendor library extractions.
function addVendors() {
    let extractions = Config.extractions.map(entry.addExtraction.bind(entry));

    // If we are extracting vendor libraries, then we also need
    // to extract Webpack's manifest file to assist with caching.
    if (extractions.length) {
        extractions.push(path.join(entry.base, 'manifest'));
    }

    return extractions;
}


// Finally, we'll append all Sass/Less/Stylus references,
// and they'll neatly be extracted to their own files.
function addStylesheets() {
    Object.keys(Config.preprocessors).filter(p => p !== 'fastSass').forEach(type => {
        Config.preprocessors[type].forEach(preprocessor => {
            entry.add(entry.keys()[0], preprocessor.src.path());
        });
    });
}


module.exports = function () {
    entry = new Entry();

    addScripts();
    let extractions = addVendors();
    addStylesheets();

    return {
        entry: entry.get(),
        extractions
    };
};
;;