Skip to content

Commit bdae9b6

Browse files
authored
Remove server worker registration from default templates (#9349)
1 parent 2bef8a5 commit bdae9b6

File tree

4 files changed

+0
-302
lines changed

4 files changed

+0
-302
lines changed

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

-6
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

-149
This file was deleted.

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

-6
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

-141
This file was deleted.

0 commit comments

Comments
 (0)