From a98e381f8cb8cf5c84cfaa5824ba87562c74c97a Mon Sep 17 00:00:00 2001 From: Eric Tuvesson Date: Mon, 23 Sep 2024 08:44:54 +0200 Subject: [PATCH] fix: deploy in devmode (#74) This occurred because building in dev mode does not create the source map files which it expects to copy over. --- .../editor/src/utils/compilation/build/deploy-index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/noodl-editor/src/editor/src/utils/compilation/build/deploy-index.ts b/packages/noodl-editor/src/editor/src/utils/compilation/build/deploy-index.ts index 2967581..a573f6f 100644 --- a/packages/noodl-editor/src/editor/src/utils/compilation/build/deploy-index.ts +++ b/packages/noodl-editor/src/editor/src/utils/compilation/build/deploy-index.ts @@ -67,6 +67,14 @@ async function _writeFileToFolder({ runtimeType }: WriteFileToFolderArgs) { const fullPath = filesystem.join(getExternalFolderPath(), runtimeType, url); + + if (!filesystem.exists(fullPath)) { + // TODO: Save this warning somewhere, usually, this is not an issue though. + // This occurred because building in dev mode does not create the source map + // files which it expects to copy over. + return; + } + let content = await filesystem.readFile(fullPath); let filename = url;