使用tsc编译代码的时候发现我的别名并没有转换,但是我已经配置了Paths,这里是tsconfig.json
{
"compilerOptions": {
// https://github.com/TypeStrong/ts-loader/issues/1061
"target": "ES5",
"lib": ["dom", "dom.iterable", "esnext"],
"paths": {
"@/*": ["./src/*"],
"doc/*": ["./site/*"],
"docs/*": ["./site/Components/*"],
"ethan/*": ["./src/*"],
"ethan": ["./src/index.ts"]
},
"rootDir": "src",
"outDir": "publish/css",
"experimentalDecorators": true,
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "CommonJS",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "react",
"strict": false,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"baseUrl": "./",
"strictNullChecks": false,
"alwaysStrict": false,
"downlevelIteration": true,
},
"include": ["src"],
"exclude": ["node_modules", "ssh-client", "webpack", "scripts", "docs-pages","publish"]
}
代码的编译文件部分之一是here
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLocale = exports.setLocale = void 0;
// @ts-nocheck
var objects_1 = require("@/utils/objects");
我的代码哪里错了
谢谢~~~