Skip to content

Commit 0e59ad1

Browse files
iansuwombleton
authored andcommitted
Remove server worker registration from default templates (facebook#9349)
1 parent 14491dc commit 0e59ad1

File tree

4 files changed

+0
-302
lines changed

4 files changed

+0
-302
lines changed

packages/cra-template-typescript/template/src/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
5-
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
65
import reportWebVitals from './reportWebVitals';
76

87
ReactDOM.render(
@@ -12,11 +11,6 @@ ReactDOM.render(
1211
document.getElementById('root')
1312
);
1413

15-
// If you want your app to work offline and load faster, you can change
16-
// unregister() to register() below. Note this comes with some pitfalls.
17-
// Learn more about service workers: https://cra.link/PWA
18-
serviceWorkerRegistration.unregister();
19-
2014
// If you want to start measuring performance in your app, pass a function
2115
// to log results (for example: reportWebVitals(console.log))
2216
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals

packages/cra-template-typescript/template/src/serviceWorkerRegistration.ts

Lines changed: 0 additions & 149 deletions
This file was deleted.

packages/cra-template/template/src/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
5-
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
65
import reportWebVitals from './reportWebVitals';
76

87
ReactDOM.render(
@@ -12,11 +11,6 @@ ReactDOM.render(
1211
document.getElementById('root')
1312
);
1413

15-
// If you want your app to work offline and load faster, you can change
16-
// unregister() to register() below. Note this comes with some pitfalls.
17-
// Learn more about service workers: https://cra.link/PWA
18-
serviceWorkerRegistration.unregister();
19-
2014
// If you want to start measuring performance in your app, pass a function
2115
// to log results (for example: reportWebVitals(console.log))
2216
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals

packages/cra-template/template/src/serviceWorkerRegistration.js

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)