Skip to content

Commit

Permalink
feat: add Astro 4 support (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Nov 29, 2023
1 parent 97ebe83 commit 17bd01c
Show file tree
Hide file tree
Showing 8 changed files with 1,228 additions and 592 deletions.
2 changes: 1 addition & 1 deletion examples/pwa-prompt/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineConfig({
],
},
workbox: {
navigateFallback: '/q',
navigateFallback: '/',
globPatterns: ['**/*.{css,js,html,svg,png,ico,txt}'],
},
devOptions: {
Expand Down
6 changes: 5 additions & 1 deletion examples/pwa-prompt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"types": ["vite-plugin-pwa/info"]
"types": [
"astro/client",
"vite-plugin-pwa/vanillajs",
"vite-plugin-pwa/info"
]
}
}
6 changes: 5 additions & 1 deletion examples/pwa-simple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"types": ["vite-plugin-pwa/info"]
"types": [
"astro/client",
"vite-plugin-pwa/vanillajs",
"vite-plugin-pwa/info"
]
}
}
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/astro",
"type": "module",
"version": "0.1.5",
"packageManager": "pnpm@8.10.3",
"packageManager": "pnpm@8.11.0",
"description": "Zero-config PWA for Astro",
"author": "antfu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand All @@ -23,11 +23,9 @@
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
},
"./dist/*": "./dist/*"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
Expand All @@ -37,31 +35,32 @@
"*.d.ts"
],
"scripts": {
"build": "unbuild",
"build": "unbuild && esno scripts/postbuild.ts",
"lint": "eslint .",
"lint-fix": "nr lint --fix",
"prepublishOnly": "npm run build",
"release": "bumpp && npm publish"
},
"peerDependencies": {
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0",
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0 || ^4.0.0-0",
"vite-plugin-pwa": ">=0.16.5 <1"
},
"dependencies": {
"vite-plugin-pwa": ">=0.16.5 <1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@antfu/ni": "^0.21.8",
"@antfu/eslint-config": "^0.43.1",
"@antfu/ni": "^0.21.12",
"@types/debug": "^4.1.8",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"astro": "^3.0.5",
"bumpp": "^9.2.0",
"eslint": "^8.49.0",
"eslint": "^8.54.0",
"esno": "^4.0.0",
"https-localhost": "^4.7.1",
"typescript": "^5.2.2",
"unbuild": "^1.2.1",
"typescript": "^5.3.2",
"unbuild": "^2.0.0",
"vite": "^4.3.9"
}
}
Loading

0 comments on commit 17bd01c

Please sign in to comment.