fix(framework): Fix compiler to create the dist after clean-up (#12582)

* fix(framework): Fix compiler to create the dist after clean-up

* Create angry-stingrays-fetch.md
This commit is contained in:
Adrien de Peretti
2025-05-22 15:30:39 +02:00
committed by GitHub
parent 98798f305c
commit 7685d66c07
2 changed files with 11 additions and 1 deletions
@@ -1,7 +1,7 @@
import type { AdminOptions, ConfigModule, Logger } from "@medusajs/types"
import { FileSystem, getConfigFile, getResolvedPlugins } from "@medusajs/utils"
import chokidar from "chokidar"
import { access, constants, copyFile, rm } from "fs/promises"
import { access, constants, copyFile, mkdir, rm } from "fs/promises"
import path from "path"
import type tsStatic from "typescript"
@@ -284,6 +284,11 @@ export class Compiler {
)
await this.#clean(dist)
/**
* Create first the target directory now that everything is clean
*/
await mkdir(dist, { recursive: true })
/**
* Step 2: Compile TypeScript source code
*/