Skip to content

加上ui-component-loader就报错,无法解析文件类型 #7

Open
@LYfirstday

Description

@LYfirstday

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')
},
依赖文件
image

期望antd按需加载;实际报错,无法解析的文件类型;不加ui-component-loader能正常运行
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions