HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/douven.komma.pro/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').replace(/\\/g, '/'));
    }

    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
    };
};