Giter Club home page Giter Club logo

Comments (8)

Goyathlay avatar Goyathlay commented on June 8, 2024

this is original code: https://github.com/Goyathlay/test-nextjs-mf

from universe.

markhughes avatar markhughes commented on June 8, 2024

Could you try using namespaces for the babel plugin in each of your projects?

    ["styled-components", {
      "ssr": true,
      "namespace": "shell"
    }]

and

    ["styled-components", {
      "ssr": true,
      "namespace": "component-kit"
    }]

from universe.

githubdocyrillo avatar githubdocyrillo commented on June 8, 2024

Same problem, but with next 11.

It seems to me that the dependencies are not being shared, by the webpack_share_scopes , it is not correct

from universe.

ScriptedAlchemy avatar ScriptedAlchemy commented on June 8, 2024

Looks related to the hooks error some are getting

from universe.

githubdocyrillo avatar githubdocyrillo commented on June 8, 2024

The problems seem to be related. Both React and styled components are not being shared between microfronts.

But, expose components is working

from universe.

ScriptedAlchemy avatar ScriptedAlchemy commented on June 8, 2024

under the hood i think styled components uses hooks, there is a hook error in your console

from universe.

w1687021088 avatar w1687021088 commented on June 8, 2024

I can use the sharing of styled-components in the module federation normally, but some warnings occurred in the consumption
It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.

from universe.

w1687021088 avatar w1687021088 commented on June 8, 2024

在引擎盖下,我认为样式组件使用钩子,您的控制台中有一个钩子错误

Have you ever encountered such a situation

It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.

在引擎盖下,我认为样式组件使用钩子,您的控制台中有一个钩子错误

from universe.

Related Issues (20)

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.