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: src/content/guides/progressive-web-application.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Available on:
47
47
Hit CTRL-C to stop the server
48
48
```
49
49
50
-
If you open your browser to `http://localhost:8080` (i.e. `http://127.0.0.1`) you should see your webpack application being served up from the `dist` directory. If you stop the server and refresh, the webpack application is no longer available.
50
+
If you open your browser to `http://localhost:8080` (i.e. `http://127.0.0.1`) you should see your webpack application being served from the `dist` directory. If you stop the server and refresh, the webpack application is no longer available.
51
51
52
52
This is what we aim to change. Once we reach the end of this module we should be able to stop the server, hit refresh and still see our application.
53
53
@@ -73,20 +73,20 @@ __webpack.config.js__
73
73
app: './src/index.js',
74
74
print: './src/print.js'
75
75
},
76
-
plugins: [
77
-
new CleanWebpackPlugin(['dist']),
78
-
new HtmlWebpackPlugin({
79
-
- title: 'Output Management'
80
-
+ title: 'Progressive Web Application'
81
-
- })
82
-
+ }),
83
-
+ new WorkboxPlugin.GenerateSW({
84
-
+ // these options encourage the ServiceWorkers to get in there fast
85
-
+ // and not allow any straggling "old" SWs to hang around
86
-
+ clientsClaim: true,
87
-
+ skipWaiting: true
88
-
+ })
89
-
],
76
+
plugins: [
77
+
new CleanWebpackPlugin(['dist']),
78
+
new HtmlWebpackPlugin({
79
+
-title: 'Output Management'
80
+
+title: 'Progressive Web Application'
81
+
-})
82
+
+}),
83
+
+new WorkboxPlugin.GenerateSW({
84
+
+// these options encourage the ServiceWorkers to get in there fast
85
+
+// and not allow any straggling "old" SWs to hang around
0 commit comments