File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,16 @@ import ReactDOM from 'react-dom'
4
4
const title = 'Hello React UI Interactions'
5
5
6
6
ReactDOM . render ( < div > { title } </ div > , document . getElementById ( 'app' ) )
7
+
8
+ if ( 'serviceWorker' in navigator ) {
9
+ window . addEventListener ( 'load' , ( ) => {
10
+ navigator . serviceWorker
11
+ . register ( '/service-worker.js' )
12
+ . then ( registration => {
13
+ console . log ( 'SW registered: ' , registration )
14
+ } )
15
+ . catch ( registrationError => {
16
+ console . log ( 'SW registration failed: ' , registrationError )
17
+ } )
18
+ } )
19
+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module.exports = {
29
29
] ,
30
30
devtool : 'cheap-module-source-map' ,
31
31
output : {
32
- filename : '[name].bundle. js' ,
32
+ filename : '[name].js' ,
33
33
path : path . resolve ( __dirname , 'dist' )
34
34
}
35
35
}
You can’t perform that action at this time.
0 commit comments