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

[NextJS] Support multiple site with a single NextJS app. #1237

Closed
mjarosch opened this issue Nov 10, 2022 · 4 comments
Closed

[NextJS] Support multiple site with a single NextJS app. #1237

mjarosch opened this issue Nov 10, 2022 · 4 comments

Comments

@mjarosch
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We host multiple websites in our Sitecore instance. When transitioning to NextJS and headless, we need to have multiple NextJS apps, one for each website. Also, our websites share enterprise components that provide brand consistency across sites, so this creates the requirement to either re-implement the shared components for each site or to have a shared component library.

Describe the solution you'd like

The ability to host multiple websites with a single NextJS application deployment that has components that are shared across sites along with site specific components.

Describe alternatives you've considered

Adding site and theme specific component support to a NextJS application and creating a deployment of a single codebase for each site.

Additional information

@mjarosch
Copy link
Contributor Author

mjarosch commented Nov 11, 2022

I have been working on a proof of concept for adding multisite support at https://github.com/mjarosch/jss/tree/feature/multisite. I had it working then did some refactoring and pulled in the latest changes from 'dev' and now I am getting a "ReferenceError: react is not defined" error.

Figured out the issue caused by my refactoring and have it working again. Need to review implications of the fix and determine if there is a cleaner solution.

@art-alexeyenko
Copy link
Contributor

Hi @mjarosch !

@ambrauer has already commented on the PR, but I wanted to keep the conversation here up to date too.
This is great stuff, and thank you for contributing! We're actually working on an implementation now and might use some ideas from the POC as a reference, if you don't mind.

@mjarosch
Copy link
Contributor Author

Hi @art-alexeyenko, like I told @ambrauer, it's great to hear this is on your roadmap and will be in a future version. Feel free to use whatever you need from my POC, ideas of how to do something, seeing how you should not do something 😄, whatever you can use.

@ambrauer
Copy link
Contributor

Closing this one as we will be introducing multisite in an upcoming release (see #1288).
Thanks again for your contribution here @mjarosch :)

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

3 participants