PWABuilder icon indicating copy to clipboard operation
PWABuilder copied to clipboard

[VSCODE] Existing ServiceWorker not taken into account

Open adrausch opened this issue 2 years ago • 2 comments

What happened?

Hello,

When using the "validate PWA" option: Screenshot 2022-07-11 at 22 48 54 I can add my existing manifest.json file, but the serviceWorker.ts is just grey Screenshot 2022-07-11 at 22 49 54

When I'm using the sidebar, I can select my "serviceWorker.ts" file but nothing happened. Screenshot 2022-07-11 at 23 29 28

I tried to create a serviceWorker2.ts with just import { precacheAndRoute } from 'workbox-precaching/precacheAndRoute'; precacheAndRoute([{"revision":"56c0643d438746f025130b884697fcd1","url":"index.css"}]); But this file was not accepted by PWA Studio either...

PS: if you need more context, the project I'm working with is the only repo I have on my github account

What do you expect to happen?

I expected that one of my serviceworker file would be taken into account. I really have no suggestion on how to fix the issue

What version of VS Code are you using?

VS Code Stable

Relevant log output

No response

Are you using the latest version of the VS Code extension?

  • [X] I am using the latest version of the VS Code extension

adrausch avatar Jul 11 '22 21:07 adrausch

At first glance, I would imagine that this is happening because .ts isn't an expected filetype but I'm not sure.

@jgw96 can you confirm this?

If this is the case, should be an easy fix.

zateutsch avatar Jul 14 '22 19:07 zateutsch

@zateutsch after looking at it I think its a little bit of a file path issue too, I think Ill have this one done today.

jgw96 avatar Aug 02 '22 14:08 jgw96