You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Creating src/service-worker.ts breaks AMP validation in Google Webmaster because svelte-kit injects custom <script> tag to install the service-worker.
Expected: svelte-kit should inject amp-install-serviceworker if config.kit.amp is true or let users to customize it.
@asendia what do you think about #2281 as a fix for this? It allows you to turn off automatic service worker registration so that you can handle it yourself
I'm not terribly familiar with either AMP no service workers, so I don't fully understand the issue you're facing
Describe the bug
Issue: Creating
src/service-worker.ts
breaks AMP validation in Google Webmaster because svelte-kit injects custom<script>
tag to install the service-worker.Expected: svelte-kit should inject amp-install-serviceworker if
config.kit.amp
istrue
or let users to customize it.PR: #2265
Reproduction
src/service-worker.ts
config.kit.amp = true
insvelte.config.js
Custom JavaScript is not allowed.
Example: https://github.com/asendia/salmonfit/tree/f5aea01869760c83d57403a8cad3e1bfdee8e7aa
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
Workaround that I did: ugly postinstall script to modify
ssr.js
: https://github.com/asendia/salmonfit/blob/3d9b0316a85c6164db01946529bc8b15d0ec31b8/scripts/replace-sw-amp.jsThe text was updated successfully, but these errors were encountered: