src/index.js
function processJavascript(fileName, script, processedTemplate, style, filePath) {

    script = script.replace(VUE_COMPONENT_IMPORT_REG, function (matchedLine, variableName, vuePath, index, contents) {
        return "var " + variableName + " = global.__FORGE_ES6_VUE_COMPONENTS__['" + path.resolve(filePath, vuePath).replace(/\\/g, "/") + "']";
    });

    script = script.replace(SCRIPT_REPLACER_REG, "var " + fileName + " = Vue.extend(");

    script += ");\n";


    script += fileName + ".options.template = " + processedTemplate;

    // script = script.replace(/__gvptemplate/m, processedTemplate);

    return script;

}
function processJavascript(fileName, script, processedTemplate, style, filePath) {

    script = script.replace(VUE_COMPONENT_IMPORT_REG, function (matchedLine, variableName, vuePath, index, contents) {
        return "var " + variableName + " = global.__FORGE_ES6_VUE_COMPONENTS__['" + path.resolve(filePath, vuePath).replace(/\\/g, "/") + "']";
    });

    script = script.replace(SCRIPT_REPLACER_REG, "var " + fileName + " = Vue.extend(");

    script += ");\n";


    script += fileName + ".options.template = " + processedTemplate;

    // script = script.replace(/__gvptemplate/m, processedTemplate);

    return script;

}
处理js  将es6写的带export的部分转换成普通的组件定义
@param fileName
@param script
@param processedTemplate
@param style
@returns {string|*}