@cocreate/pwa 1.3.15 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/package.json +2 -2
- package/src/index.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.3.17](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.3.16...v1.3.17) (2022-12-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump dependencies ([76eb3af](https://github.com/CoCreate-app/CoCreate-pwa/commit/76eb3afd2ed399a73b306c3d82f591cba6942672))
|
|
7
|
+
|
|
8
|
+
## [1.3.16](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.3.15...v1.3.16) (2022-12-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([d00c28c](https://github.com/CoCreate-app/CoCreate-pwa/commit/d00c28cf3e7c2f54f9abf9d39c8c6f2beeda5ca7))
|
|
14
|
+
* set defualt serviceworker path if not defined ([16cfd4c](https://github.com/CoCreate-app/CoCreate-pwa/commit/16cfd4c4c8ab7d12b59699dc15d4314ae467729e))
|
|
15
|
+
|
|
1
16
|
## [1.3.15](https://github.com/CoCreate-app/CoCreate-pwa/compare/v1.3.14...v1.3.15) (2022-12-04)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/pwa",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "A simple pwa component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
"webpack-log": "^3.0.1"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@cocreate/docs": "^1.4.
|
|
63
|
+
"@cocreate/docs": "^1.4.15"
|
|
64
64
|
}
|
|
65
65
|
}
|
package/src/index.js
CHANGED
|
@@ -59,13 +59,13 @@ async function persistData() {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
if ('serviceWorker' in navigator) {
|
|
62
|
-
let workerPath
|
|
63
|
-
if (window.CoCreateConfig && window.CoCreateConfig.serviceWorker)
|
|
62
|
+
let workerPath
|
|
63
|
+
if (window.CoCreateConfig && window.CoCreateConfig.serviceWorker)
|
|
64
64
|
workerPath = window.CoCreateConfig.serviceWorker
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
else
|
|
66
|
+
workerPath = window.localStorage.getItem("serviceWorker") || '/sw.js'
|
|
67
|
+
|
|
68
|
+
window.localStorage.setItem("serviceWorker", workerPath);
|
|
69
69
|
|
|
70
70
|
let isPwa = true
|
|
71
71
|
if (workerPath) {
|