const {getFileType, fileTypePreConfig} = require('./util/util');

/*
 * Pug/Jade loader.
 */
module.exports = (options = {}) => {
    const {
        test = /\.(pug|jade)$/,
        fileType = 'text/x-pug',
        exclude,
        include,
        fileOptions,
        pugOptions,
    } = options;

    const pugLoader = context => ({
        module: {
            rules: [
                {
                    test: getFileType(context, test, fileType),
                    exclude,
                    include,
                    use: [
                        {
                            loader: 'file-loader',
                            options: fileOptions,
                        },
                        {
                            loader: 'pug-loader',
                            options: pugOptions,
                        },
                    ],
                },
            ],
        },
    });

    return Object.assign(pugLoader, {
        pre: fileTypePreConfig(test, fileType),
    });
};

@@ -247,32 +247,56 @@
    fileOptions,%0A
+        extractOptions,%0A
         pugOptio
@@ -731,32 +731,192 @@
               %7B%0A
+                            loader: 'extract-loader',%0A                            options: extractOptions,%0A                        %7D,%0A                        %7B%0A
                 

Fix pugLoader