When I compiled the code using tsc, I found that my alias name had not been converted, but I had already configured Paths,Here is 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"]
}
One of the compiled file parts of the code is 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");
Where is my code wrong
Thanks~~~
you probably have to install additional dependencies for that like module-alias or tsconfig-paths