Closed SwingCosmic closed 3 months ago
I have a file named axios.ts . If any file includes import axios from "axios" in the same directory, it will be replaced to const axios_1 = require("./axios"), not use the dependency in node_modules !
axios.ts
import axios from "axios"
const axios_1 = require("./axios")
node_modules
tsconfig.json sets baseUrl to ".".
tsconfig.json
baseUrl
"."
Debug log:
tsc-alias debug: default replacer - requiredModule: 'axios' tsc-alias debug: default replacer - alias: tsc-alias debug: base-url replacer - requiredModule: 'axios' tsc-alias debug: base-url replacer - relativePath: './' tsc-alias debug: base-url replacer - newImportScript: 'import(".//axios")' tsc-alias debug: base-url replacer - modulePath: './/axios' tsc-alias debug: replaced file with changes: 'E:/dev/work/node/test/server/axios.d.ts'
Dupe: https://github.com/justkey007/tsc-alias/issues/197
This should be closed after #218 PR
I have a file named
axios.ts
. If any file includesimport axios from "axios"
in the same directory, it will be replaced toconst axios_1 = require("./axios")
, not use the dependency innode_modules
!tsconfig.json
setsbaseUrl
to"."
.Debug log: