Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilerOptions from tsconfig.json #766

Merged
merged 8 commits into from Sep 9, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/index.js
Expand Up @@ -109,7 +109,7 @@ function ncc (
// add TsconfigPathsPlugin to support `paths` resolution in tsconfig
// we need to catch here because the plugin will
// error if there's no tsconfig in the working directory
let fullTsconfig;
let fullTsconfig = {};
try {
const tsconfig = tsconfigPaths.loadConfig();
fullTsconfig = loadTsconfig(tsconfig.configFileAbsolutePath) || {
Expand Down Expand Up @@ -334,15 +334,10 @@ function ncc (
transpileOnly,
compiler: eval('__dirname + "/typescript.js"'),
compilerOptions: {
...fullTsconfig.compilerOptions,
styfle marked this conversation as resolved.
Show resolved Hide resolved
allowSyntheticDefaultImports: true,
module: 'esnext',
outDir: '//',
...(fullTsconfig &&
fullTsconfig.compilerOptions &&
fullTsconfig.compilerOptions.incremental
? { incremental: false }
: {}),
styfle marked this conversation as resolved.
Show resolved Hide resolved
noEmit: false
noEmit: false,
outDir: '//'
}
}
}]
Expand Down