Description
tsconfig.json文件配置
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"module": "commonjs",
"jsx": "react",
"target": "es5",
"declaration": true,
"lib": ["es6", "es7", "dom", "esnext"],
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
"removeComments": true
},
"include": [
"./src/**/*"
],
"exclude": [
"node_modules",
"config",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"dist",
"server"
]
}
webpack.config.js文件部分配置
{
test: /.tsx?$/,
use: [
"ts-loader",
{
loader: 'ui-component-loader',
options: {
'lib': 'antd',
'style': 'style/index.css',
}
}
],
include: path.resolve(__dirname, 'node_modules/antd')
},
依赖文件