FIX: Make the workbox path compatible with multisite

Closes
https://meta.discourse.org/t/full-url-in-assets-erb-file-multisite-issues/124393?u=falco
This commit is contained in:
Rafael dos Santos Silva 2019-08-05 15:00:41 -03:00
parent e6831afea1
commit b1f5949868

View File

@ -1,9 +1,9 @@
'use strict'; 'use strict';
importScripts("<%= ::UrlHelper.absolute("/javascripts/workbox/workbox-sw.js") %>"); importScripts("<%= "#{Discourse.asset_host}#{Discourse.base_path}/javascripts/workbox/workbox-sw.js") %>");
workbox.setConfig({ workbox.setConfig({
modulePathPrefix: "<%= ::UrlHelper.absolute("/javascripts/workbox") %>", modulePathPrefix: "<%= "#{Discourse.asset_host}#{Discourse.base_path}/javascripts/workbox") %>",
debug: false debug: false
}); });