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:
1 parent
98798f305c
commit
7685d66c07
2 files changed
+11
-1
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/framework": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(framework): Fix compiler to create the dist after clean-up
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { AdminOptions, ConfigModule, Logger } from "@medusajs/types"
|
import type { AdminOptions, ConfigModule, Logger } from "@medusajs/types"
|
||||||
import { FileSystem, getConfigFile, getResolvedPlugins } from "@medusajs/utils"
|
import { FileSystem, getConfigFile, getResolvedPlugins } from "@medusajs/utils"
|
||||||
import chokidar from "chokidar"
|
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 path from "path"
|
||||||
import type tsStatic from "typescript"
|
import type tsStatic from "typescript"
|
||||||
|
|
||||||
@@ -284,6 +284,11 @@ export class Compiler {
|
|||||||
)
|
)
|
||||||
await this.#clean(dist)
|
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
|
* Step 2: Compile TypeScript source code
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user