Skip to content

Commit

Permalink
Fix SW
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelc2209 committed May 23, 2024
1 parent 66f4a16 commit 8b70bda
Show file tree
Hide file tree
Showing 6 changed files with 477 additions and 187 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"react-dom": "^18.2.0",
"typescript": "5.4.5",
"vite": "^5.2.11",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0",
Expand Down
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

6 changes: 0 additions & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { BrowserRouter } from 'react-router-dom';

import { App } from './App';
import { disableReactDevTools } from './disableReactDevTools';
import * as serviceWorker from './serviceWorker';
import { GlobalStyle } from './GlobalStyles';

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
Expand All @@ -19,8 +18,3 @@ root.render(
);

if (process.env.NODE_ENV === 'production') disableReactDevTools();

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.register();
139 changes: 0 additions & 139 deletions src/serviceWorker.ts

This file was deleted.

3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import { VitePWA } from 'vite-plugin-pwa';

export default defineConfig({
base: '/',
plugins: [react()],
plugins: [react(), VitePWA({ registerType: 'autoUpdate' })],
test: {
globals: true,
environment: 'jsdom',
Expand Down
Loading

0 comments on commit 8b70bda

Please sign in to comment.