Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit dcff48a

Browse files
committed
Added the sw worker to be copied into the folder where app is served from
1 parent b792c8c commit dcff48a

File tree

4 files changed

+4
-55
lines changed

4 files changed

+4
-55
lines changed

src/pages/open-forge-app/open-forge-app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class OpenForgeApp {
7575
}
7676

7777
listenForNewServiceWorker = window.addEventListener('load', () => {
78-
navigator.serviceWorker.register('assets/sw.js').then(registration => {
78+
navigator.serviceWorker.register('./sw.js').then(registration => {
7979
// Track updates to the Service Worker
8080
if (!navigator.serviceWorker.controller) {
8181
// The window client isn't currently controlled so it's a new service worker that will activate immediately
File renamed without changes.

stencil.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ exports.config = {
1919
{
2020
type: 'www',
2121
serviceWorker: {
22-
swSrc: 'assets/sw.js'
22+
swSrc: 'sw.js'
2323
}
2424
}
2525
],
2626
copy: [
27-
{ src: 'robots.txt' }
27+
{ src: 'robots.txt' },
28+
{ src: 'sw.js' }
2829
]
2930
};
3031

sw.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)