diff --git a/packages/semi-json-viewer-core/script/compileLib.js b/packages/semi-json-viewer-core/script/compileLib.js index 8ebd89e6d6..a97cb29067 100644 --- a/packages/semi-json-viewer-core/script/compileLib.js +++ b/packages/semi-json-viewer-core/script/compileLib.js @@ -45,6 +45,9 @@ const compile = async ()=>{ if (!fs.existsSync(saveDir)) { fs.mkdirSync(saveDir); } + if (!fs.existsSync(workerSaveDir)) { + fs.mkdirSync(workerSaveDir); + } fs.writeFileSync(path.join(workerSaveDir, "worker.js"), workerRaw, 'utf8'); fs.writeFileSync(path.join(saveDir, "index.js"), finalRaw, 'utf8'); };