Skip to content

Commit 9ad93df

Browse files
committed
Use moduleResolution classic when --syncAllFiles option is not specified
Fixes NativeScript/nativescript-cli#3378
1 parent d152f80 commit 9ad93df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/before-prepare.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ module.exports = function ($logger, $projectData, $options, hookArgs) {
1111
}
1212

1313
var release = $options.release || appFilesUpdaterOptions.release;
14-
return compiler.runTypeScriptCompiler($logger, $projectData.projectDir, { release });
14+
var syncAllFiles = $options && $options.syncAllFiles;
15+
return compiler.runTypeScriptCompiler($logger, $projectData.projectDir, { release, syncAllFiles });
1516
}

lib/compiler.js

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function runTypeScriptCompiler(logger, projectDir, options) {
3535
nodeArgs.push('--inlineSourceMap', '--inlineSources');
3636
}
3737

38+
if (!options.syncAllFiles) {
39+
nodeArgs.push('--moduleResolution', "classic");
40+
}
41+
3842
logger.trace(process.execPath, nodeArgs.join(' '));
3943
tsc = spawn(process.execPath, nodeArgs);
4044

0 commit comments

Comments
 (0)