mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Drop workbox dependency (#26735)
This service-worker caching functionality was disabled by default in 1c58395bca, and the setting to re-enable was marked as experimental. Now we are dropping all the related logic.
This commit is contained in:
@@ -46,15 +46,6 @@ class EmberCli < ActiveSupport::CurrentAttributes
|
||||
end
|
||||
end
|
||||
|
||||
def self.workbox_dir_name
|
||||
return @workbox_base_dir if defined?(@workbox_base_dir)
|
||||
|
||||
@workbox_base_dir =
|
||||
if (full_path = Dir.glob("app/assets/javascripts/discourse/dist/assets/workbox-*")[0])
|
||||
File.basename(full_path)
|
||||
end
|
||||
end
|
||||
|
||||
def self.has_tests?
|
||||
File.exist?("#{dist_dir}/tests/index.html")
|
||||
end
|
||||
|
||||
@@ -54,8 +54,6 @@ Sprockets::DirectiveProcessor.prepend(
|
||||
Sprockets::Asset.prepend(
|
||||
Module.new do
|
||||
def digest_path
|
||||
# Workbox assets are already in a folder with a digest in the name
|
||||
return logical_path if logical_path.start_with?("workbox-")
|
||||
# Webpack chunks are already named based on their contents
|
||||
return logical_path if logical_path.start_with?("chunk.")
|
||||
super
|
||||
|
||||
@@ -267,7 +267,6 @@ task "assets:precompile:compress_js": "environment" do
|
||||
manifest
|
||||
.files
|
||||
.select { |k, v| k =~ /\.js\z/ }
|
||||
.reject { |k, v| k =~ %r{/workbox-.*'/} }
|
||||
.each do |file, info|
|
||||
path = "#{assets_path}/#{file}"
|
||||
_file =
|
||||
|
||||
Reference in New Issue
Block a user