Giter Site home page Giter Site logo

niexq / react-app-qiankun-main Goto Github PK

View Code? Open in Web Editor NEW
80.0 2.0 30.0 636 KB

🚀 基于create-react-app,qiankun构建并部署的测试用例(react主应用)Based on create-react-app, qiankun builds and deploys a simple main demo

Home Page: https://qiankun.xiaoqiang.tech

License: MIT License

HTML 17.51% CSS 20.32% JavaScript 62.18%
qiankun qiankun-example qiankun-demo qiankun-react-example qiankun-vue-example qiankun-react-demo create-react-app-qiankun vue-cli-qiankun react-qiankun vue-qiankun qiankun-angular qiankun-react qiankun-vue qiankun-vue-demo react react-demo

react-app-qiankun-main's Issues

react子应用嵌套vue子应用有问题

export default function() {
const [visible, setVisible] = useState(false);
const curRef = useRef(null)

useEffect(() => {
return loadMicroApp({
name: "vue",
entry: "//localhost:3344/vue",
container: "#aa",
});
},[])

return (
<>


<Button onClick={() => setVisible(true)}>CLICK ME
<Modal
visible={visible}
onOk={() => setVisible(false)}
onCancel={() => setVisible(false)}
title="qiankun"
>
Probably the most complete micro-frontends solution you ever met

</>
);
}

在qiankun-demo/react-app-qiankun-sub/src/components/HelloModal.jsx文件里加上,就显示不出嵌套的子应用

主应用 npm start 时报错

image


Compiled with problems:
×
ERROR
Cannot find module 'classnames'
at webpackMissingModule (http://localhost:1122/static/js/bundle.js:20:50)
at ./src/App.js (http://localhost:1122/static/js/bundle.js:20:135)
at options.factory (http://localhost:1122/static/js/bundle.js:54228:31)
at webpack_require (http://localhost:1122/static/js/bundle.js:53674:33)
at fn (http://localhost:1122/static/js/bundle.js:53885:21)
at ./src/index.js (http://localhost:1122/static/js/bundle.js:353:62)
at options.factory (http://localhost:1122/static/js/bundle.js:54228:31)
at webpack_require (http://localhost:1122/static/js/bundle.js:53674:33)
at http://localhost:1122/static/js/bundle.js:54810:37
at http://localhost:1122/static/js/bundle.js:54812:12
ERROR in ./src/App.js 9:0-36
Module not found: Error: Can't resolve 'classnames' in '/Users/mac/Desktop/init/src'

您好,咨询!

公共的登录功能加入集成在基座中。打开基座域名,我登录状态可以分发,我要单独进入子应用的域名,怎么加载登录组件呢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.