mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
PERF: Improve workbox loading strategy (#22019)
Previously workbox JS was vendored into our git repository, and would be loaded from the `public/javascripts` directory with a 1 day cache lifetime. The main aim of this commit is to add 'cachebuster' to the workbox URL so that the cache lifetime can be increased. - Remove vendored copies of workbox. - Use ember-cli/broccoli to collect workbox files from node_modules into assets/workbox-{digest} - Add assets to sprockets manifest so that they're collected from the ember-cli output directory (and uploaded to s3 when configured) Some of the sprockets-related changes in this commit are not ideal, but we hope to remove sprockets in the not-too-distant future.
This commit is contained in:
@ -87,32 +87,6 @@ def dependencies
|
||||
source: "@discourse/moment-timezone-names-translations/locales/.",
|
||||
destination: "moment-timezone-names-locale",
|
||||
},
|
||||
{ source: "workbox-sw/build/.", destination: "workbox", public: true, skip_versioning: true },
|
||||
{
|
||||
source: "workbox-routing/build/.",
|
||||
destination: "workbox",
|
||||
public: true,
|
||||
skip_versioning: true,
|
||||
},
|
||||
{ source: "workbox-core/build/.", destination: "workbox", public: true, skip_versioning: true },
|
||||
{
|
||||
source: "workbox-strategies/build/.",
|
||||
destination: "workbox",
|
||||
public: true,
|
||||
skip_versioning: true,
|
||||
},
|
||||
{
|
||||
source: "workbox-expiration/build/.",
|
||||
destination: "workbox",
|
||||
public: true,
|
||||
skip_versioning: true,
|
||||
},
|
||||
{
|
||||
source: "workbox-cacheable-response/build/.",
|
||||
destination: "workbox",
|
||||
skip_versioning: true,
|
||||
public: true,
|
||||
},
|
||||
{
|
||||
source: "squoosh/codecs/mozjpeg/enc/mozjpeg_enc.js",
|
||||
destination: "squoosh",
|
||||
|
Reference in New Issue
Block a user