We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
通过联邦模块eposes出去的组件访问不到umi history对象
子应用umi配置
mf: { name: 'homeRemote', remoteHash: false, library: { type: 'window', name: 'homeRemote' }, shared: { react: { singleton: true, eager: true, requiredVersion: '18.3.1' }, 'react-dom': { singleton: true, eager: true, requiredVersion: '18.3.1' }, } }
主应用联邦配置
mf: { remotes: [ { name: 'homeRemote', entry: `http://localhost:8100/remote.js`, }, ], },
主应用消费配置
import { safeMfImport } from 'umi'; const HomePage = React.lazy(() => { return safeMfImport('homeRemote/HomePage', { default: 'loading' }); }); export default withCoreContext((props: any) => { return ( <React.Suspense fallback={<HomeSkeleton />}> <HomePage globalState={{ token: props.cookie, profile: props.profile, }} /> </React.Suspense> ); });
子应用exposes代码
Steps to reproduce the behavior: 1. 2.
Expected behavior 1. 2.
The text was updated successfully, but these errors were encountered:
这个umi 太垃圾了,提个问题都给关闭了, 分包怎么都禁用不了,看下这个配置有啥问题吗,官方文档都是流水一文带过,禁用分包都有bug,在 umi3x 的版本有效,升级umi4x 就失效了,按照文档也无效
import { defineConfig } from "umi"; export default defineConfig({ alias: { "@": "./src", }, extraBabelPlugins: [], codeSplitting: false, legacy: { nodeModulesTransform: false, }, copy: [{ from: "./src/assets", to: "./dist/static" }], chainWebpack(config, { webpack }) { config.plugin('extract-css').use(require('mini-css-extract-plugin'), [ { filename: `main.css`, chunkFilename: `[name].chunk.css`, }, ]); config.output.filename('app.js') }, });
Sorry, something went wrong.
No branches or pull requests
What happens?
通过联邦模块eposes出去的组件访问不到umi history对象
子应用umi配置
主应用联邦配置
主应用消费配置
子应用exposes代码
How To Reproduce
Steps to reproduce the behavior: 1. 2.
Expected behavior 1. 2.
Context
The text was updated successfully, but these errors were encountered: