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
Do you want to request a feature or report a bug?
What is the current behavior? 使用 window.fetch 获取资源
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior? 支持自定义 fetch
The text was updated successfully, but these errors were encountered:
export interface StartConfiguration { ... fetch?: (input: string) => Promise<Response>; }
export declare function createMicroApp(app: string | AppConfig, appLifecyle?: AppLifecylceOptions, configuration: StartConfiguration): Promise<MicroApp>;
设置仅支持改微子应用。
import { registerMicroApps, start } from '@ice/stark'; import customFetcher from './customFetcher'; registerMicroApps([ { path: '/waiter', title: '小二平台', sandbox: true, url: [ '//ice.alicdn.com/icestark/child-waiter-vue/app.js', '//ice.alicdn.com/icestark/child-waiter-vue/app.css', ], } ], { afterMount: () => { console.log('mounted') }, }); start({ fetch: customFetcher, })
import { createMicroApp, unloadMicroApp } from '@ice/stark'; import customFetcher from './customFetcher'; const App = () => { const appContainer = useRef(null); useEffect(() => { createMicroApp( { name: 'microapp', url: [ '//ice.alicdn.com/icestark/child-waiter-vue/app.js', '//ice.alicdn.com/icestark/child-waiter-vue/app.css', ], container: appContainer.current }, { afterMount: () => { console.log('mounted!') } }, { fetch: customFetcher } ); return () => { unloadMicroApp('microapp'); } }, []); return <div ref={appContainer}></div> }; export default App;
Sorry, something went wrong.
maoxiaoke
No branches or pull requests
Do you want to request a feature or report a bug?
What is the current behavior?
使用 window.fetch 获取资源
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
支持自定义 fetch
The text was updated successfully, but these errors were encountered: