Skip to content

Commit c629f64

Browse files
authored
fix: stop adding short paths remappings for tns-core-modules (#76)
The short imports for `tns-core-modules` may be deprecated in future versions of {N}.
1 parent 2d5a56f commit c629f64

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tsconfig-upgrader.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var __migrations = [
55
inlineSourceMapMigration,
66
addDomLibs,
77
addIterableToAngularProjects,
8-
addTnsCoreModulesPathMappings,
98
];
109

1110
function migrateProject(tsConfig, tsconfigPath, projectDir) {
@@ -81,23 +80,6 @@ function addTsLib(existingConfig, libName) {
8180
}
8281
}
8382

84-
function addTnsCoreModulesPathMappings(existingConfig, displayableTsconfigPath, projectDir) {
85-
console.log("Adding tns-core-modules path mappings lib to tsconfig.json...");
86-
existingConfig["compilerOptions"] = existingConfig["compilerOptions"] || {};
87-
var compilerOptions = existingConfig["compilerOptions"];
88-
compilerOptions["baseUrl"] = ".";
89-
compilerOptions["paths"] = compilerOptions["paths"] || {};
90-
91-
const appPath = getAppPath(projectDir);
92-
compilerOptions["paths"]["~/*"] = compilerOptions["paths"]["~/*"] || [
93-
`${appPath}/*`
94-
];
95-
compilerOptions["paths"]["*"] = compilerOptions["paths"]["*"] || [
96-
"./node_modules/tns-core-modules/*",
97-
"./node_modules/*"
98-
];
99-
}
100-
10183
function getAppPath(projectDir) {
10284
const DEFAULT_PATH = "app";
10385
const nsConfigPath = path.join(projectDir, "nsconfig.json");

0 commit comments

Comments
 (0)