Skip to content

Commit

Permalink
fix(cli): fix tsconfig mismatches for build
Browse files Browse the repository at this point in the history
  • Loading branch information
pluvrt committed Apr 16, 2024
1 parent b5edd8e commit 37b0b6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/utils/buildApp/buildApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ export const buildApp = async (options: BuildAppOptions) => {
jsx: "preserve",
lib: ["es2021"],
module: "esnext",
moduleResolution: "node",
moduleResolution: "bundler",
noEmit: true,
noUnusedLocals: false,
noUnusedParameters: false,
preserveWatchOutput: true,
resolveJsonModule: true,
skipLibCheck: true,
strict: true,
target: "es2021",
target: "esnext",
include: resolveDependencies({ input }),
compilerOptions: { sourceMap: false },
}),
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/utils/buildApp/resolveDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ const crawlDependencies = (program: Program): readonly string[] => {
.getText()
.replace(/(^("|'|`))|(("|'|`)$)/g, "");

const resolvedModule = ts.resolveModuleName(
const { resolvedModule } = ts.resolveModuleName(
moduleName,
sourceFile.fileName,
program.getCompilerOptions(),
ts.sys,
);

const resolvedFile =
resolvedModule.resolvedModule?.resolvedFileName;
const resolvedFile = resolvedModule?.resolvedFileName;

if (!resolvedFile) return;

Expand Down

0 comments on commit 37b0b6f

Please sign in to comment.