pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[doc]: How to set up a monorepo for Venia-UI extensions and other plug-ins/extensions

Open GeKVe opened this issue 3 years ago • 4 comments

Describe the request Most PWA projects will need a few extensions/plugins to fit each storefronts needs. There's little guidance in how to properly set up a project to work as a monorepo with yarn workspaces.

The relationship of PWA-studio and Venia-Concept is quite confusing for new developers.

Maybe there should be line or two about what's what - maybe some examples of how to launch a PWA from each platform would clear up the picture?

I have tried various setups and found a few things to keep in mind when working on a monorepo:

  • Should one still use yarn create @magento/pwa og rather git clone pwa-studio ?
  • The root folder should allways be the PWA root - and contain the webpack-config - there be dragons if you put the pwa-studio package inside my-workspace/packages/pwa-studio

This is the main problem/missing information of the documentation:

  • You still need to add your own packages to devDependencies in order to trigger the "pwa-studio" section of their package.json
  • You need to add your own vendor-name under "pwa-studio": { "trusted-vendors": ["@your-name"] } to enable intercepting React Components.

Possible solutions

Add some documentation or sample-project of a recommended monorepo/workspaces setup with "packages/my-custom-ui" and "packages/extensions/my-custom-extension"

OR

Update https://github.com/magento-research/pwa-studio-target-experiments and provide a more available link to that repo in the main documentation

Please let us know whether this is a new topic or a topic change request:

  • [x] New Topic Request (ie. missing entire topic/section)
  • [ ] Topic Change Request (ie. spelling, organization)

GeKVe avatar Feb 15 '22 15:02 GeKVe

Hi @GeKVe. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Feb 15 '22 15:02 m2-assistant[bot]

@magento I am working on this

ghost avatar Apr 17 '22 16:04 ghost

@magento export issue to JIRA project PWA as Story

anthoula avatar May 16 '22 14:05 anthoula

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2838 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 16 '22 14:05 github-jira-sync-bot