Coder Social home page Coder Social logo

Comments (6)

johnboxall avatar johnboxall commented on July 17, 2024 1

Quick update, we're continuing to evaluate SSG/CSR on Managed Runtime but at this time it is not on the committed roadmap.

from pwa-kit.

drewzboto avatar drewzboto commented on July 17, 2024

I wanted to confirm your approach here, as we have done some similar work in the past, but didn't carry that forward into PWA Kit.

Are you looking to take your PWA Kit code and bundle it directly in a hybrid cordova-based native app, which doesn't require any additional downloading of files/assets from PWA Kit and Managed Runtime>? Or are you trying to embed a PWA kit site into a cordova-based webview (say use the existing cart/checkout pages from PWA Kit within a hybrid native app webvview)?

We've done the 2nd approach in the past, but we haven't focused on the 1st approach at all, and that does reflect in the SSR setup and build setup

from pwa-kit.

drewzboto avatar drewzboto commented on July 17, 2024

@nx-andreashabermann tagging you here to make sure you saw my clarification questions. Thank you!

from pwa-kit.

johnboxall avatar johnboxall commented on July 17, 2024

Making assumptions about what you're asking for, if you'd like to use Managed Runtime to host a "vanilla" React client side rendered app, you can use "Hello World" template as a starting point:

https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/hello-world

There is also a experimental version of this template in our upcoming major version:

https://github.com/SalesforceCommerceCloud/pwa-kit/tree/black-friday-hackathon/packages/hello-world

from pwa-kit.

nx-andreashabermann avatar nx-andreashabermann commented on July 17, 2024

Basically the final goal should be the 1st approach. Using hello-world would mean to start at 0, at least it should be possible to set up nearly anything from that starting point, but the development time will much higher that way.

Here are the problems I got to when trying to use pwa-kit as base implementation with client side code in the hybrid app bundle:

  1. Routing: would be easier to have hash based routing for this approach
  2. Proxying/Development setup: The setup for development especially proxying the requests to the apis can make different problems, e.g. CORS and building the proxy server URLs.
  3. Some Commerce API endpoints do not support OPTIONS requests, so CORS preflight requests will cause errors if they get proxied to these APIs

Clientside rendering itself works as expected, as PWA is a react app.

from pwa-kit.

git2gus avatar git2gus commented on July 17, 2024

This issue has been linked to a new work item: W-14515712

from pwa-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.