fix(core): update

This commit is contained in:
Philipp Kunz 2022-03-15 20:06:48 +01:00
parent f5ee2c2c70
commit b68aa06941

View File

@ -16,17 +16,12 @@ export const compilerOptionsDefault: CompilerOptions = {
module: plugins.typescript.ModuleKind.ES2020,
target: plugins.typescript.ScriptTarget.ES2020,
moduleResolution: plugins.typescript.ModuleResolutionKind.Node12,
lib: [],
lib: ['lib.dom.d.ts'],
noImplicitAny: true,
esModuleInterop: true,
importsNotUsedAsValues: plugins.typescript.ImportsNotUsedAsValues.Preserve
};
export const compilerOptionsWebDefault: CompilerOptions = {
...compilerOptionsDefault,
lib: [...compilerOptionsDefault.lib, 'lib.dom.d.ts']
};
/**
* merges compilerOptions with the default compiler options
*/
@ -34,17 +29,9 @@ export const mergeCompilerOptions = (
customTsOptions: CompilerOptions,
argvArg?: any
): CompilerOptions => {
const defaultOptionsToMerge = (() => {
if (argvArg && argvArg.web) {
return compilerOptionsWebDefault;
} else {
return compilerOptionsDefault;
}
})();
// create merged options
const mergedOptions: CompilerOptions = {
...defaultOptionsToMerge,
...compilerOptionsDefault,
...customTsOptions,
...argvArg && argvArg.skiplibcheck ? {
skipLibCheck: true