nl_tokens: 将vue文件中的内容，进行转换，生成多页引用的vue
pl_tokens: function convertToJSContent ( script , template , style , fileName , filePath ) { if ( ! script ) { return "" ; } //兼容 windows filePath = filePath . replace ( / \\ / g , "/" ) ; let jsFileContent = ` ` ; if ( style && style . length > 0 ) { jsFileContent += ` ` + fileName + ` \n ` ; } jsFileContent += processJavascript ( fileName , <mask> , processTemplate ( template ) , style , filePath ) ; jsFileContent += "\n\nglobal." + fileName + " = " + fileName + ";\n\n" ; //伪造ES6格式的VUE组件 jsFileContent += "global.__FORGE_ES6_VUE_COMPONENTS__['" + filePath + "/" + fileName + ".vue']=" + fileName + ";\n" ; jsFileContent += "Vue.component('vue" + fileName . replace ( / ([A-Z]) / g , "-$1" ) . toLowerCase ( ) + "', " + fileName + ");\n\n" ; jsFileContent += "\n}(window, Vue));" ; return jsFileContent ; }