Theme Update - Faster Preview Generation

With Theme 1.19, when you create a live preview, we’ll now be using webpack’s development mode by default; this will reduce the time it takes to generate the preview!
:racing_car: :racing_car: :racing_car: :racing_car:

If you want to use the full production mode (like we use for publishes), you can…

  1. Navigate to ci/serve.sh
  2. The third line of the file says export IS_DEVELOPMENT_PREVIEW='true' . Update this to export IS_DEVELOPMENT_PREVIEW=‘false’
  3. Restart live preview

Before deploying a site, we always recommend testing the full production build. You can do this in two ways:

  1. Publish the site on staging. This will publish with IS_DEVELOPMENT_PREVIEW='false' always.
  2. Update the variable in serve.sh to IS_DEVELOPMENT_PREVIEW='false', then restart live preview and view the subsequent preview

Upgrade Implications

If you are upgrading to this version, you won’t get the speediness by default. You should update the ci/serve.sh file as follows:

Before

#!/bin/sh
export NODE_OPTIONS="--max-old-space-size=1024"
serve -l 8080 desktop/ &
grunt watch

After

#!/bin/sh
export NODE_OPTIONS="--max-old-space-size=1024"
export IS_DEVELOPMENT_PREVIEW='true'

serve -l 8080 desktop/ &
grunt watch