[MGNLFE-635] Move components to separated projects Created: 11/Sep/23  Updated: 18/Oct/23  Resolved: 18/Oct/23

Status: Closed
Project: Magnolia Frontend Helpers
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Neutral
Reporter: Phong Le Quoc Assignee: Phong Le Quoc
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 4d 6.75h Time Spent: 4d 6.75h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLFE-640 Create nextjs13-app-router-ssg-minimal Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLFE-636 Implementation Sub-task To Do  
MGNLFE-637 Review Sub-task To Do  
MGNLFE-638 Pre-Integration QA Sub-task To Do  
MGNLFE-639 QA Sub-task To Do  
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: React RSC
Team: DeveloperX
Work Started:

 Description   

Move components to separated projects so that a nextjs-app-router-ssg-minimal can be created.

 

Is related https://jira.magnolia-cms.com/browse/MGNLFE-570



 Comments   
Comment by Phong Le Quoc [ 12/Sep/23 ]

Found a library might help us not to separate components to projects. https://github.com/mayank1513/esbuild-react18-useclient/

Comment by Phong Le Quoc [ 20/Sep/23 ]

Conclusion:

  • We still need to separate the components: servers and clients
  • We can avoid code duplication if we want to use the same utils, and data objects in server and client components with help from the lib above.

=> we will have at least 3 projects: servers, clients, and share (utils and data objects)

Comment by Phong Le Quoc [ 18/Oct/23 ]

We can use tsup to create multiple bundles from one project. This solution work well but it is a bit difficult to find coding error.

Generated at Mon Feb 12 05:49:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.