umi-plugin-keep-alive
umi-plugin-keep-alive copied to clipboard
<KeepAlive> for umijs base on react-activation
 
`import { KeepAlive } from 'umi';` `export default () => ( );`  
``` export default connect(({ global }: { global: any }) => ({ global, }))((props) => { return ( {/* keepalive 时 组件内如何拿全局数据 */} ); }); ```
直接报错。 ERROR in ./src/.umi/plugin-keep-alive/runtime.tsx
在pc上生效,在iphone的safari和微信内置浏览器均工作不正常
 把/home路由的count加1,切换到/chart路由,再切回到/home,count又变成0了 
api.addUmiExports 需要兼容 api.addEntryImports api.utils.Mustache 需要兼容 import { Mustache } from 'umi/plugin-utils';
 这样写没问题吧?还需要在其他地方有配置吗?
使用了"umi-plugin-keep-alive": "^0.0.1-beta.31"插件,启动项目之后报TypeError: Cannot read properties of undefined (reading 'location') 错误! 使用keep-alive页面才报错 未使用keep-alive页面正常运行 node版本 : 16.13.0 14.15.4 12.18.3 上述node版本都试过 有时重新安装多次依赖本地开发环境页面正常运行,但是打包发布到线也是报TypeError: Cannot read properties of undefined (reading 'location') 错误! Umi Version: ^3.5.17...