Skip to content
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

Build for qiankun tips error #2

Open
xuchangjunjx opened this issue Jul 10, 2024 · 1 comment
Open

Build for qiankun tips error #2

xuchangjunjx opened this issue Jul 10, 2024 · 1 comment

Comments

@xuchangjunjx
Copy link

Error: [qiankun]: You need to export lifecycle functions in my-demo entry

// with chain 
 chain.output.library({
        name:"kb_observer_[name]",
        type:'umd',
        umdNamedDefine: true,
	// export: options.export,
      });
  chain.output.chunkLoadingGlobal("webpackJsonp_my_dem0");
  chain.output.uniqueName('my_demo_app');
  chain.output.globalObject('this');

if change chain.output.globalObject('this'); to chain.output.globalObject('self');, will works

@chenjiahan
Copy link
Member

I think the UMD plugin will not change the default value of globalObject, you can override it if it it required by qiankun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants