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!
If you want to use the full production mode (like we use for publishes), you can…
- Navigate to
ci/serve.sh
- The third line of the file says
export IS_DEVELOPMENT_PREVIEW='true'
. Update this to export IS_DEVELOPMENT_PREVIEW=‘false’ - Restart live preview
Before deploying a site, we always recommend testing the full production build. You can do this in two ways:
- Publish the site on staging. This will publish with
IS_DEVELOPMENT_PREVIEW='false'
always. - 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