Skip service workers in development by default (#10617)

This commit is contained in:
Ben Halpern 2020-10-07 03:23:11 -04:00 committed by GitHub
parent 0a5babc10e
commit b800b81c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1,10 +1,12 @@
# Development options
export SKIP_SERVICEWORKERS="true"
# App core values
export APP_DOMAIN="localhost:3000"
export APP_PROTOCOL="http://"
export APP_NAME="forem_local"
export FOREM_OWNER_SECRET="secret"
# Openresty domain + Protocol setting for development
export OPENRESTY_DOMAIN=""
export OPENRESTY_PROTOCOL=""

View file

@ -1,5 +1,5 @@
// Serviceworkers file. This code gets installed in users browsers and runs code before the request is made.
<% unless Rails.env.test? %>
<% unless Rails.env.test? || ENV["SKIP_SERVICEWORKERS"] == "true" %>
const staticCacheName = 'static-1.2';
const expectedCaches = [
staticCacheName