From c0e63f9646b47ce7ef163edaa8dda10e1ffe9bdf Mon Sep 17 00:00:00 2001 From: meixg Date: Mon, 13 Sep 2021 13:40:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B6=E6=95=9B=20renderer=20?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: a6deec81986575d687daab64e39e937fe69a24ae --- src/target-js/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/target-js/index.ts b/src/target-js/index.ts index f6d69348..ed863642 100644 --- a/src/target-js/index.ts +++ b/src/target-js/index.ts @@ -35,13 +35,12 @@ export default class ToJSCompiler implements TargetCodeGenerator { if (options.bareFunctionBody) { emitter.writeLine('let exports = {}, module = { exports };') this.doCompileToSource(sourceFile, options, emitter) - emitter.writeLine('return module.exports(data, {noDataOutput});') + emitter.writeLine('return module.exports(data, info);') } else if (options.bareFunction) { emitter.writeFunction('render', ['data', 'info'], () => { - emitter.writeLine('let noDataOutput = info && info.noDataOutput;') emitter.writeLine('let exports = {}, module = { exports };') this.doCompileToSource(sourceFile, options, emitter) - emitter.writeLine('return module.exports(data, {noDataOutput});') + emitter.writeLine('return module.exports(data, info);') }) } else { this.doCompileToSource(sourceFile, options, emitter)