智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/57/57a58f998c4141bc2032ab7ffc1...

2 lines
1.5 KiB

"use strict";var _path=_interopRequireDefault(require("path")),_webpackSources=require("webpack-sources");function _interopRequireDefault(n){return n&&n.__esModule?n:{default:n}}const extList=[".mix",".ux",".vue"];class InstVuePlugin{constructor(n){this.options=n}apply(n){const e=this;n.hooks.compilation.tap("InstVuePlugin",(function(n){n.hooks.optimizeChunkAssets.tapAsync("InstVuePlugin",(function(t,o){t.forEach((function(t){_path.default.extname(Array.from(t.entryModule.buildInfo.fileDependencies)[0])===extList[2]&&t.files.forEach((function(t){const o=e.instVue(t,n);o&&(n.assets[t]=o)}))})),o()}))}))}instVue(n,e){if(/\.js$/.test(n))return n.match(/\bapp\.js$/)?new _webpackSources.ConcatSource("(function(){\n var handler = function() {\n return ",e.assets[n],`\n };\n if (typeof window === "undefined") {\n let options = handler();\n options.default['manifest'] = ${JSON.stringify(global.framework.manifest)}\n $app_define$(options.default)\n $app_bootstrap$()\n }\n })();`):new _webpackSources.ConcatSource("(function(){\n var handler = function() {\n return ",e.assets[n],"\n };\n if (typeof window === \"undefined\") {\n let options = handler();\n options = options.default ? options.default: options\n options['type'] = 'page'\n new Vue({render: function(h) {return h(options)}}).$mount('#app')\n }\n })();")}}module.exports=InstVuePlugin;
//# sourceMappingURL=instvue-plugin.js.map