mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
fix: PWA issue
This commit is contained in:
parent
0adae696cf
commit
4b2d5a2b3c
1 changed files with 28 additions and 33 deletions
|
|
@ -2,11 +2,7 @@
|
|||
|
||||
import { register } from "register-service-worker";
|
||||
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
process.env.IS_ELECTRON === "undefined"
|
||||
) {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
ready() {
|
||||
console.log(
|
||||
"App is being served from cache by a service worker.\n" +
|
||||
|
|
@ -33,5 +29,4 @@ if (
|
|||
error(error) {
|
||||
console.error("Error during service worker registration:", error);
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue