Skip to content

Instantly share code, notes, and snippets.

@Frodigo
Created March 24, 2021 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frodigo/c38869b7f8cdbbd99a8b83b62e30c722 to your computer and use it in GitHub Desktop.
Save Frodigo/c38869b7f8cdbbd99a8b83b62e30c722 to your computer and use it in GitHub Desktop.
PWA Studio extending Storefront example
$ yarn create @magento/pwa
$ cd <project_dir>
$ yarn run buildpack create-custom-origin
$ yarn run watch
$ yarn create @larsroettig/pwa-extension
const { Targetables } = require('@magento/pwa-buildpack');
module.exports = targets => {
const targetables = Targetables.using(targets);
const ProductFullDetailComponent = targetables.reactComponent(
'@magento/venia-ui/lib/components/ProductFullDetail/productFullDetail.js'
);
ProductFullDetailComponent.insertBeforeJSX('<Button type="submit" />', '<span>Hello World! </span>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment