pwa-studio
pwa-studio copied to clipboard
[doc]: How to set up a monorepo for Venia-UI extensions and other plug-ins/extensions
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 rathergit 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)
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
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento I am working on this
@magento export issue to JIRA project PWA as Story
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2838 is successfully created for this GitHub issue.