运行打包命令 father-build
xxx.tsx
import styles from './index.less'
......
<div className={styles.header}>111</div>
.fatherrc.ts
export default {
esm: 'babel',
};
tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"types": ["jest", "node"],
"strict": true,
"skipLibCheck": true,
"declaration": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@tmp/*": ["src/pages/.umi/*"]
},
},
"exclude": ["node_modules", "build", "dist", "scripts", "src/.umi/*", "webpack", "jest"]
}
打包时报错
请问下这种问题怎么解决,是怎么引起的