Signed-off-by: lizhouze <lizhouze@huawei.com>
This commit is contained in:
lizhouze
2022-07-21 18:25:36 +08:00
parent dd2f4ad8ed
commit 87ae50fac0
+1 -1
View File
@@ -100,7 +100,7 @@ function handlePluginCompileComponent(jsonData) {
const sourceNode = ts.createSourceFile('preview.ets',
'struct preview{build(){' + receivedMsg.data.script + '}}',
ts.ScriptTarget.Latest, true, ts.ScriptKind.ETS, compilerOptions);
compileWithCheck = jsonData.data.compileWithCheck;
compileWithCheck = jsonData.data.compileWithCheck || 'true';
if (previewCacheFilePath && fs.existsSync(previewCacheFilePath)
&& compileWithCheck === 'true') {
writeFileSync(previewCacheFilePath, 'struct preview{build(){' + receivedMsg.data.script + '}}');