From d7b8d147fe287099b6ede08a7a68d8552cf03b62 Mon Sep 17 00:00:00 2001 From: Mozafar Haider Date: Wed, 31 Jul 2024 18:49:15 +0100 Subject: [PATCH] fix: update makePaths to work when no options are passed --- cli/src/commands/build.js | 1 + cli/src/lib/paths.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/commands/build.js b/cli/src/commands/build.js index 2231b1b5..79697824 100644 --- a/cli/src/commands/build.js +++ b/cli/src/commands/build.js @@ -58,6 +58,7 @@ const handler = async ({ force, pack: packAppOutput, }) => { + // todo: we need to infer TypeScript in build command here similar to start const paths = makePaths(cwd) mode = mode || (dev && 'development') || getNodeEnv() || 'production' diff --git a/cli/src/lib/paths.js b/cli/src/lib/paths.js index 6a113975..34d8c7ef 100644 --- a/cli/src/lib/paths.js +++ b/cli/src/lib/paths.js @@ -18,7 +18,7 @@ const findYarnLock = (base, rootDirectory) => { return findYarnLock(path.dirname(base), rootDirectory) } -module.exports = (cwd = process.cwd(), { typeScript }) => { +module.exports = (cwd = process.cwd(), { typeScript } = {}) => { const base = path.resolve(cwd) const rootDirectory = path.parse(cwd).root const initFolder = typeScript ? 'init-typescript' : 'init'