-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
FAQ #1421
Comments
proxy代理不成功,没有代理到实际地址代理只是服务请求代理,这个地址是不会变的。 |
|
配了
|
umi dev 之后页面一直在不停地刷新怎么办?这是因为 html 和 umi.js 的端口不一致。 比如:
然后你访问 html,并且在 html 里引用了 8000 端口的 umi.js,这样会导致 socket server 连接出错,触发了循环刷新问题。 解决配置 SOCKET_SERVER 到 |
如何禁用掉每次刷新路由时出现的 loading... 状态?解决给 dynamicImport 配置加上
|
antd-pro 项目热更新慢并且是在 95% (emitting) 时卡住怎么办?编辑 |
This comment has been minimized.
This comment has been minimized.
如何配置额外的 loader需同时配置 export default {
urlLoaderExcludes: [
/\.md$/,
],
chainWebpack(config) {
config.module.rule('md')
.test(/\.md$/)
.use('raw')
.loader('raw-loader')
}
} |
layout 路由如何传值给子路由推荐用 context 或者数据流方案,如果用 cloneElement 传值需要传两级,因为第一级是 Switch,然后才是 Route。 React.Children.map(children, child => {
return React.cloneElement(child, null, React.Children.map(child.props.children, child => {
return React.cloneElement(child, { test: 'test' });
}));
}) 参考: |
antd-pro 项目热更新慢并且是在 95% (emitting) 时卡住怎么办?编辑 If the compilation is slow or gets stuck at 95%, go to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
我在文档中找不到相关描述,请教一下如何配置rules的enforce,例如与下面的webpack配置等价的配置方法: module.exports = {
module: {
rules: [
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
}
]
}
}; |
我在仓库源码中找到一条配置作为参考:
但是并没有生效,仍然看不到sourcemap: config.module.rule('source-map-loader')
.test(/\.js$/)
.enforce('pre')
.use('source-map-loader')
.loader('source-map-loader') |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
umi 好像不支持 react.lazy,如果支持的话,怎样把 lazy 的组件单独打包成 async 的包? |
有一个IE9以下浏览器没有获取到css样式的问题,项目用的umi+dva+antd,配置了按需加载。查找了一下打包完的dist文件夹,发现一个vendors.chunk.css文件,好像是antd库的打包。不知道是不是因为它有300多kb所以ie9无法读取,想请问一下: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
如何声明路由参数类型?https://github.com/umijs/umi/issues/3983,路由参数捕获声明类型遇到问题,参照 react-router 的文档 也没有解决 |
ant design 4.0 发布了,umi create 创建的 pro项目模板啥时候更新下啊 |
同样的问题,因为 umi 的依赖包比如 dva 是通过 father 编译的,本来就不带 sourcemap,编译的时候像 react-redux 这种库并没有编译进去 |
基于@umijs/plugin-layout 的侧边栏菜单配置中的icon是否能支持本地图片或者svg?,如果使用antd的icon打包下来的icon贼大。 |
我记得哪里看到说是可以按需加载? |
@xiaohuoni 这里的问题整理到 https://umijs.org/zh-CN/docs/faq 吧。 |
有群地址吗 |
首页,底部 https://umijs.org/ |
Is there some way to build with electron to make a desktop app? |
开启按需加载后如何把 css 打包成一个文件?
配置 splitChunks,比如:
打包后会输出:
示例:
参考:
The text was updated successfully, but these errors were encountered: