!857 preview pipe server default enable

Merge pull request !857 from 卡哥/jsyl
This commit is contained in:
openharmony_ci
2022-07-22 06:39:51 +00:00
committed by Gitee
+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 + '}}');