mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
fix: PWA issue
This commit is contained in:
parent
0adae696cf
commit
4b2d5a2b3c
1 changed files with 28 additions and 33 deletions
|
|
@ -2,10 +2,6 @@
|
||||||
|
|
||||||
import { register } from "register-service-worker";
|
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() {
|
ready() {
|
||||||
console.log(
|
console.log(
|
||||||
|
|
@ -34,4 +30,3 @@ if (
|
||||||
console.error("Error during service worker registration:", error);
|
console.error("Error during service worker registration:", error);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue