mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 15:52:21 +08:00
The service worker isn't served via normal asset paths or the CDN. Instead, the ERB was being compiled by sprockets, fished out of the `public/` directory by the static_controller, and then the sprockets-specific stuff like `sourceMappingUrl` was being removed. Instead, we can put the ERB under `views/static/`, and have it evaluate at runtime. There are only a couple of super-cheap interpolations, plus the route is cached in nginx, so there is no performance concern. This takes us one step closer to removing sprockets. |
||
|---|---|---|
| .. | ||
| login.html.erb | ||
| service-worker.js.erb | ||
| show.html.erb | ||