const path = require('path');
const config = require('../config');
const ExtractTextPlugin = require('extract-text-webpack-plugin');


exports.assetsPath = function (_path) {
    const assetsSubDirectory = process.env.NODE_ENV === 'production'
        ? config.build.assetsSubDirectory
        : config.dev.assetsSubDirectory;
    return path.posix.join(assetsSubDirectory, _path);
};

exports.cssLoaders = function (options) {
    const option = options || {};

    const cssLoader = {
        loader: 'css-loader',
        options: {
            minimize: process.env.NODE_ENV === 'production',
            sourceMap: option.sourceMap,
        },
    };

    // generate loader string to be used with extract text plugin
    function generateLoaders(loader, loaderOptions) {
        const loaders = [cssLoader];
        if (loader) {
            loaders.push({
                loader: `${loader}-loader`,
                options: Object.assign({}, loaderOptions, {
                    sourceMap: options.sourceMap,
                }),
            });
        }

        // Extract CSS when that option is specified
        // (which is the case during production build)
        if (options.extract) {
            return ExtractTextPlugin.extract({
                ues: loaders,
                fallback: 'vue-style-loader',
            });
        }
        return ['vue-style-loader'].concat(loaders);
    }

    // https://vue-loader.vuejs.org/en/configurations/extract-css.html
    return {
        css: generateLoaders(),
        postcss: generateLoaders(),
        less: generateLoaders('less'),
        sass: generateLoaders('sass', { indentedSyntax: true }),
        scss: generateLoaders('sass'),
        styus: generateLoaders('stylus'),
        styl: generateLoaders('stylus'),
    };
};

// Generate loader for standalone style files (outside of .vue)
exports.styleLoaders = function styleLoaders(options) {
    const output = [];
    const loaders = exports.cssLoaders(options);
    for (const extension in loaders) {
        if ({}.hasOwnProperty.call(loaders, extension)) {
            const loader = loaders[extension];
            output.push({
                test: new RegExp(`\\.${extension}$`),
                use: loader,
            });
        }
    }
    return output;
};

@@ -1989,16 +1989,19 @@
 ns);%0A   
+ //
  for (co
@@ -2027,24 +2027,27 @@
 aders) %7B%0A   
+ //
      if (%7B%7D.
@@ -2088,24 +2088,27 @@
 sion)) %7B%0A   
+ //
          con
@@ -2138,24 +2138,27 @@
 ension%5D;%0A   
+ //
          out
@@ -2164,32 +2164,34 @@
 tput.push(%7B%0A    
+//
             test
@@ -2186,16 +2186,17 @@
         
+ 
 test: ne
@@ -2224,24 +2224,27 @@
 ion%7D$%60),%0A   
+ //
             
@@ -2256,24 +2256,27 @@
  loader,%0A   
+ //
          %7D);
@@ -2271,32 +2271,35 @@
          %7D);%0A   
+ //
      %7D%0A    %7D%0A   
@@ -2289,25 +2289,223 @@
 /     %7D%0A    
-%7D
+// %7D%0A    Object.keys(loaders).forEach((item) =%3E %7B%0A        const loader = loaders%5Bitem%5D;%0A        output.push(%7B%0A            test: new RegExp(%60%5C%5C.$%7Bitem%7D$%60),%0A            use: loader,%0A        %7D);%0A    %7D);
 %0A    return 

modify utils.js