-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: [引入antd组件 打包出错]:No name was provided for external + error TS2307: Cannot find module #178
Comments
umd 包建议回归 webpack,father 的下一个版本也会使用 webpack 来打包 umd,rollup 确实坑太多了 |
father 3 预计何时能用啊 |
报错原因: 这是我的 pr:umijs/father#220 |
最终实践出了demo:https://github.com/jsany/lean |
目前有其它方案了么, "father-build": "^1.20.5-0", "dumi": "^1.1.36", 遇到同样问题,png下import引入报 cant find module |
What happens?
使用 yarn create @umijs/dumi-lib 创建的项目
背景:
打包 抛出错误:
可以看到有两处:
1. No name was provided for external module 'antd/lib/divider' in output.globals – guessing '_Divider'
2. error TS2307: Cannot find module './index.less' or its corresponding type declarations.
针对2 我看源码,
disableTypeCheck
为true
,跳过类型检查,就会跳过 ts 编译,导致没有d.ts
文件,显然不是我想要的;disableTypeCheck
为false
,就会抛出上面的错误。Mini Showcase Repository(REQUIRED)
Versions
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Chrome: 81.0.4044.138
Edge: Not Found
Firefox: 74.0
Safari: 13.1
The text was updated successfully, but these errors were encountered: