浏览代码

Fix service workers in production, for real this time

Jasper van Merle 6 年之前
父节点
当前提交
921a61cd1f
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 1 1
      assets/javascripts/app/config.coffee.erb
  2. 4 0
      assets/javascripts/news.json

+ 1 - 1
assets/javascripts/app/config.coffee.erb

@@ -14,4 +14,4 @@ app.config =
   release: <%= Time.now.utc.httpdate.to_json %>
   mathml_stylesheet: '<%= App.cdn_origin %>/mathml.css'
   service_worker_path: '/service-worker.js'
-  service_worker_enabled: '<%= App.environment == 'production' || ENV['ENABLE_SERVICE_WORKER'] == 'true' %>' == 'true'
+  service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %>

+ 4 - 0
assets/javascripts/news.json

@@ -1,4 +1,8 @@
 [
+  [
+    "2019-07-19",
+    "Replaced the AppCache with a Service Worker (which makes DevDocs an installable PWA) and fixed layout preferences on Firefox."
+  ],
   [
     "2018-09-23",
     "New documentations: <a href=\"/puppeteer/\">Puppeteer</a> and <a href=\"/handlebars/\">Handlebars.js</a>"