Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Allow multiple MRT environments to share a single domain #1767

Open
johnboxall opened this issue Apr 30, 2024 · 1 comment
Open

Comments

@johnboxall
Copy link
Collaborator

johnboxall commented Apr 30, 2024

You might want to deploy a storefront built using PWA Kit to an virtual folder on you domain as opposed to the root.

This situations comes up when you have other web properties that share a domain with a PWA Kit powered site or when you have multiple PWA Kit powered storefronts deployed to the same domain.

For example, imagine you have Canadian, American and Mexican PWA Kit based storefronts that you want hosted under www.example.com:

  • Canada: www.example.com/ca/*
  • Mexico: www.example.com/mx/*
  • US: www.example.com/*

Today, the PWA Kit relies on hardcoded, shared paths for bundle files, proxies and the worker:

This means that those three sites will fight over the shared /mobify path.

There are probably other places in the code which make the assumption that the /mobify directory is served from the root!

I'd like the ability to configure the PWA Kit to load these resources from a namespaced path prefix.

So for the above example, the prefixes would be ca, mx and no prefix.


Related to this issue, is that the B2C Commerce CDN API createMrtRules will allow you to create a eCDN hostname that routes to multiple MRT environments but, constraints around routing and this issue prevent that from working correctly!

@johnboxall johnboxall changed the title [FEATURE] Allow multiple PWA Kit storefronts to share a single domain [FEATURE] Allow multiple MRT environments to share a single domain May 9, 2024
@vcua-mobify
Copy link
Contributor

A pilot of this feature is available on https://github.com/SalesforceCommerceCloud/pwa-kit/tree/feature/basepath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants