fix(medusa): Resolve babel executable with npx (#5952)
This commit is contained in:
1 parent
c8f03e3a47
commit
487067fb48
2 files changed
+7
-9
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat(medusa): Resolve babel executable with npx
|
||||||
@@ -43,14 +43,7 @@ export default async function ({ port, directory }) {
|
|||||||
process.exit(0)
|
process.exit(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
const babelPath = path.resolve(
|
execSync(`npx --no-install babel src -d dist --ignore "src/admin/**"`, {
|
||||||
require.resolve("@babel/cli"),
|
|
||||||
"../",
|
|
||||||
"bin",
|
|
||||||
"babel.js"
|
|
||||||
)
|
|
||||||
|
|
||||||
execSync(`"${babelPath}" src -d dist --ignore "src/admin/**"`, {
|
|
||||||
cwd: directory,
|
cwd: directory,
|
||||||
stdio: ["ignore", process.stdout, process.stderr],
|
stdio: ["ignore", process.stdout, process.stderr],
|
||||||
})
|
})
|
||||||
@@ -112,7 +105,7 @@ export default async function ({ port, directory }) {
|
|||||||
child.kill("SIGINT")
|
child.kill("SIGINT")
|
||||||
|
|
||||||
execSync(
|
execSync(
|
||||||
`${babelPath} src -d dist --extensions ".ts,.js" --ignore "src/admin/**"`,
|
`npx --no-install babel src -d dist --extensions ".ts,.js" --ignore "src/admin/**"`,
|
||||||
{
|
{
|
||||||
cwd: directory,
|
cwd: directory,
|
||||||
stdio: ["pipe", process.stdout, process.stderr],
|
stdio: ["pipe", process.stdout, process.stderr],
|
||||||
|
|||||||
Reference in new issue
Block a user