Skip to content

Commit

Permalink
fix(deploy): remove vite-plugin-pwa config to resolve GitHub Actions …
Browse files Browse the repository at this point in the history
…build error
  • Loading branch information
yun-cheng committed Mar 22, 2024
1 parent 95f80a4 commit 9979fb3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
3 changes: 0 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import App from 'App'
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import theme from 'utils/muiThemeConfig'
import { registerSW } from 'virtual:pwa-register'
import './index.css'

registerSW()

const MAX_RETRIES = 1
const queryClient = new QueryClient({
defaultOptions: {
Expand Down
33 changes: 1 addition & 32 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import eslintPlugin from '@nabla/vite-plugin-eslint'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
import svgr from 'vite-plugin-svgr'
import tsconfigPaths from 'vite-tsconfig-paths'

Expand Down Expand Up @@ -30,36 +29,6 @@ export default defineConfig(({ mode }) => ({
tsconfigPaths(),
react(),
svgr(),
...(mode === 'test'
? []
: [
eslintPlugin(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: [
'favicon.png',
'robots.txt',
'apple-touch-icon.png',
'icons/*.svg',
'fonts/*.woff2'
],
manifest: {
theme_color: '#BD34FE',
icons: [
{
src: '/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable'
},
{
src: '/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
])
...(mode === 'test' ? [] : [eslintPlugin()])
]
}))

0 comments on commit 9979fb3

Please sign in to comment.