fix bug of extra type

Signed-off-by: houhaoyu <houhaoyu@huawei.com>
Change-Id: Id47c045b1208512ec15dbaddf3d922c9e6ea0299
This commit is contained in:
houhaoyu
2022-02-14 19:46:40 +08:00
parent 3925d51666
commit 762eceaced
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ function handlePluginCompileComponent(jsonData) {
const newSource = ts.factory.updateSourceFile(sourceNode, previewStatements);
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
const result = printer.printNode(ts.EmitHint.Unspecified, newSource, newSource);
receivedMsg.data.script = result;
receivedMsg.data.script = ts.transpileModule(result, {}).outputText;
if (pluginSocket.readyState === WebSocket.OPEN){
responseToPlugin(receivedMsg);
}
+1 -1
View File
@@ -100,7 +100,7 @@ function initConfig(config) {
path.join(projectPath, '../../../../../'),
'./node_modules',
path.join(__dirname, 'node_modules'),
path.join(__dirname, '../../api/common')
path.join(__dirname, '../../api')
]
},
stats: { preset: 'none' },