Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Theme editor HMR #40

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

montalvomiguelo
Copy link
Contributor

@montalvomiguelo montalvomiguelo commented Mar 15, 2021

Issue

During development assets cannot be loaded from our local.

Screen Shot 2021-03-16 at 9 58 59 PM

Solution

This PR allows Theme Editor or Builder to load assets from our local.

  1. It finds an available port
  2. It uses that port to build an absolute URL on our local to serve files
  3. It connects the HMR client to our local so it can handle changes inside Theme Editor or Builder
  4. It reloads the page using the HMR client when files upload to Shopify
  5. It updates the BRRL_PATH function, so it returns Shopify's CDN only on production

Screen Shot 2021-03-14 at 10 16 29 PM

cc @wturnerharris @bengodfrey

@montalvomiguelo montalvomiguelo force-pushed the feature/theme-editor-hmr branch from 6d279cd to f2f0a4b Compare March 16, 2021 09:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant