From f60f9b7248cd0906eeb68bd49ca02107588af18f Mon Sep 17 00:00:00 2001 From: hufeng Date: Tue, 14 Sep 2021 17:40:09 +0800 Subject: [PATCH] fixed 98439be from https://gitee.com/hufeng20/developtools_ace-ets2bundle/pulls/17 remove head & tail when generate ace2.0's abc Signed-off-by: hufeng Change-Id: I28a0b1fc8fdde2e7c912537b9a741c993a9adc1f --- compiler/src/gen_abc_plugin.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/compiler/src/gen_abc_plugin.ts b/compiler/src/gen_abc_plugin.ts index 7053b50fa..300c79e42 100644 --- a/compiler/src/gen_abc_plugin.ts +++ b/compiler/src/gen_abc_plugin.ts @@ -22,20 +22,6 @@ import { logger } from './compile_info'; const arkDir: string = path.join(__dirname, '..', 'bin', 'ark'); -const forward: string = '(global.___mainEntry___ = function (globalObjects) {' + '\n' + - ' var define = globalObjects.define;' + '\n' + - ' var require = globalObjects.require;' + '\n' + - ' var bootstrap = globalObjects.bootstrap;' + '\n' + - ' var register = globalObjects.register;' + '\n' + - ' var render = globalObjects.render;' + '\n' + - ' var $app_define$ = globalObjects.$app_define$;' + '\n' + - ' var $app_bootstrap$ = globalObjects.$app_bootstrap$;' + '\n' + - ' var $app_require$ = globalObjects.$app_require$;' + '\n' + - ' var history = globalObjects.history;' + '\n' + - ' var Image = globalObjects.Image;' + '\n' + - ' (function(global) {' + '\n' + - ' "use strict";' + '\n'; -const last: string = '\n' + '})(this.__appProto__);' + '\n' + '})'; const firstFileEXT: string = '_.js'; let output: string; let webpackPath: string; @@ -71,7 +57,7 @@ export class GenAbcPlugin { Object.keys(compilation.assets).forEach(key => { // choice *.js if (output && webpackPath && path.extname(key) === '.js') { - const newContent: string = forward + compilation.assets[key].source() + last; + const newContent: string = compilation.assets[key].source(); const keyPath: string = key.replace(/\.js$/, firstFileEXT); writeFileSync(newContent, path.resolve(output, keyPath), key); } -- Gitee