Skip to content

Commit

Permalink
chore: adjust vite settings for debuging PWD in development
Browse files Browse the repository at this point in the history
  • Loading branch information
YuskaWu committed Oct 16, 2023
1 parent 8b29580 commit 2c107d1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.DS_Store
*.local
*.local
dev-dist
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"autoprefixer": "^10.4.16",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import autoprefixer from 'autoprefixer'
import { defineConfig } from 'vite'
import checker from 'vite-plugin-checker'
// import basicSsl from '@vitejs/plugin-basic-ssl'

import { VitePWA as pwa } from 'vite-plugin-pwa'
import manifest from './manifest.json'
Expand All @@ -10,12 +11,19 @@ export default defineConfig({
plugins: [
checker({ typescript: true }),
pwa({
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: '',
filename: 'service-worker.ts',
base: './',
devOptions: {
enabled: false,
type: 'module',
webManifestUrl: 'manifest.json'
},
manifest
})
// basicSsl()
],
base: '',
server: {
Expand Down

0 comments on commit 2c107d1

Please sign in to comment.