You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-3
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ In addition, I have added setup for:
15
15
- persistent storage of redux store across pages and browser refreshes
16
16
- material-ui (with customized theme)
17
17
- SASS
18
-
- service worker registration at root scope
19
-
- module aliases (relative paths normally not needed)
18
+
- service worker registration at root scope for offline capability
19
+
- module aliases (relative paths not needed in modules)
20
20
- file compression
21
21
22
22
## To Install
@@ -30,6 +30,10 @@ In addition, I have added setup for:
30
30
git init
31
31
git remote set-url origin http://github.com/[YOUR GITHUB NAME]/[YOUR GITHUB NEW REPOSITORY]
32
32
33
+
34
+
test it out:
35
+
npm run dev
36
+
33
37
```
34
38
35
39
@@ -51,6 +55,7 @@ my-app/
51
55
.babelrc
52
56
.gitignore
53
57
manifest.json
58
+
my-service-worker.js
54
59
next.config.js
55
60
postcss.config.js
56
61
routes.js
@@ -173,5 +178,8 @@ Any time that you want to "age" the redux store to make sure that these values w
173
178
I don't like using relative paths if I don't have to (I hate trying to remember ../../..)! So I set up in the .babelrc file at the root all the aliases for different folders. If you add a folder to your project, add it in there too.
174
179
175
180
## Service Worker
176
-
Using webpack's SWPrecache Plugin, I set up a service worker at root for PWA support. It is automatically registered on every page load through the Layout component. Be sure to customize the manifest.json file at the root with your project specifics.
181
+
I set up a service worker at root (my-service-worker.js).
182
+
1. Any time that you add a page, add the url to the cache of the my-service-worker.js file in the install event and change the version number.
183
+
2. Be sure to customize the manifest.json file at the root with your project specifics, such as your project name and icons.
0 commit comments