forked from admin/deShanXiao
Compare commits
1 Commits
lxbfyeaa-p
...
@@iHMWx
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c8a234a18 |
27
backEnd/tsconfig.json
Normal file
27
backEnd/tsconfig.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["es5", "es6", "ES2022"],
|
||||||
|
"paths": {
|
||||||
|
"router/*": ["./src/router/*"],
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
},
|
||||||
|
"baseUrl": "./",
|
||||||
|
"declaration": true, // 是否生成.d.ts文件
|
||||||
|
"declarationDir": "./types", // .d.ts文件输出路径
|
||||||
|
"target": "ES5", // 编译目标
|
||||||
|
"module": "CommonJS",
|
||||||
|
// "strict": true,
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"outDir": "./build",
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true, // 用于指定是否启用实验性的装饰器特性
|
||||||
|
"sourceMap": false,
|
||||||
|
// "resolveJsonModule": true,
|
||||||
|
"allowSyntheticDefaultImports": true, // 用于允许从没有默认导出的模块中默认导入
|
||||||
|
"esModuleInterop": true, //是否允许export=导出,import from导入
|
||||||
|
},
|
||||||
|
// "ts-node": {
|
||||||
|
// "esm": true
|
||||||
|
// },
|
||||||
|
"include": ["src/**/*", "index.ts"]
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import path from "path";
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: "./index.ts",
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.ts$/,
|
|
||||||
use: "ts-loader",
|
|
||||||
exclude: /node_modules/,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: [".ts", ".js"],
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
filename: "index.js",
|
|
||||||
path: path.resolve(__dirname, "dist"),
|
|
||||||
},
|
|
||||||
target: "node",
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user