Skip to content
This repository was archived by the owner on Jan 26, 2020. It is now read-only.
This repository was archived by the owner on Jan 26, 2020. It is now read-only.

issues when importing react-native-web from multiple bundles #78

@alidcast

Description

@alidcast

support for react-native-web is done (same API, just import @roguejs/app/client.native and @roguejs/app/server.native) however, there's an issue with server-rendering critial css if you're using webpack (which most people are, specially since we recommend rogue with razzle) because it doesn't use require.cache when compiling to the Node.js target, instead it uses it's own installed modules cache which causes problems with singleton states if the code comes from multiple bundles

this issue was discovered with react-native-web/nextjs, for details see:
necolas/react-native-web#1079
https://spectrum.chat/next-js/general/singleton-issue-when-transpiling-local-modules~ba78d3a3-4ab3-48ef-9b77-956642dfbdb1?m=MTUzNjY3MTEzMDI0NQ==

for now, we'll recommend setting up programmatically. you can just look at packages/app/native-web to see how, but i'll also add it to the examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions