Skip to content

Commit f62d868

Browse files
committed
feat!: add Astro 5 support
1 parent 133e3d8 commit f62d868

File tree

10 files changed

+2197
-1644
lines changed

10 files changed

+2197
-1644
lines changed

build.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default defineBuildConfig({
1414
'workbox-build',
1515
],
1616
rollup: {
17-
emitCJS: true,
1817
dts: {
1918
respectExternal: true,
2019
},

examples/pwa-prompt/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
},
1313
"devDependencies": {
1414
"@vite-pwa/astro": "workspace:*",
15-
"astro": "^4.0.1",
16-
"workbox-window": "^7.1.0"
15+
"astro": "^5.0.9",
16+
"workbox-window": "^7.3.0"
1717
},
1818
"stackblitz": {
1919
"installDependencies": false,

examples/pwa-prompt/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"types": [
55
"astro/client",
66
"vite-plugin-pwa/vanillajs",
7-
"vite-plugin-pwa/info"
7+
"vite-plugin-pwa/info",
8+
"vite-plugin-pwa/pwa-assets"
89
]
910
}
1011
}

examples/pwa-simple-assets-generator/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"devDependencies": {
1414
"@vite-pwa/astro": "workspace:*",
15-
"astro": "^4.0.1",
16-
"workbox-window": "^7.1.0"
15+
"astro": "^5.0.9",
16+
"workbox-window": "^7.3.0"
1717
}
1818
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/// <reference types="astro/client" />
22
/// <reference types="vite-plugin-pwa/info" />
3+
/// <reference types="vite-plugin-pwa/pwa-assets" />
34
/// <reference types="vite-plugin-pwa/vanillajs" />

examples/pwa-simple/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
},
1313
"devDependencies": {
1414
"@vite-pwa/astro": "workspace:*",
15-
"astro": "^4.0.1",
16-
"workbox-window": "^7.1.0"
15+
"astro": "^5.0.9",
16+
"workbox-window": "^7.3.0"
1717
},
1818
"stackblitz": {
1919
"installDependencies": false,

index.d.ts

-1
This file was deleted.

package.json

+17-12
Original file line numberDiff line numberDiff line change
@@ -23,51 +23,56 @@
2323
],
2424
"exports": {
2525
".": {
26-
"import": "./dist/index.mjs",
27-
"require": "./dist/index.cjs"
26+
"types": "./dist/index.d.mts",
27+
"default": "./dist/index.mjs"
2828
},
2929
"./package.json": "./package.json"
3030
},
31-
"main": "dist/index.cjs",
31+
"main": "dist/index.mjs",
3232
"module": "dist/index.mjs",
3333
"types": "dist/index.d.ts",
3434
"files": [
35-
"dist",
36-
"*.d.ts"
35+
"dist"
3736
],
3837
"scripts": {
39-
"build": "unbuild && esno scripts/postbuild.ts",
38+
"build": "unbuild",
4039
"lint": "eslint .",
4140
"lint-fix": "nr lint --fix",
4241
"prepublishOnly": "npm run build",
4342
"release": "bumpp && npm publish"
4443
},
4544
"peerDependencies": {
4645
"@vite-pwa/assets-generator": "^0.2.6",
47-
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0 || ^4.0.0",
48-
"vite-plugin-pwa": ">=0.20.5 <1"
46+
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
47+
"vite-plugin-pwa": ">=0.21.1 <1"
4948
},
5049
"peerDependenciesMeta": {
5150
"@vite-pwa/assets-generator": {
5251
"optional": true
5352
}
5453
},
5554
"dependencies": {
56-
"vite-plugin-pwa": ">=0.20.5 <1"
55+
"vite-plugin-pwa": ">=0.21.1 <1"
5756
},
5857
"devDependencies": {
5958
"@antfu/eslint-config": "^0.43.1",
6059
"@antfu/ni": "^0.21.12",
6160
"@types/debug": "^4.1.8",
6261
"@types/node": "^20.8.7",
6362
"@typescript-eslint/eslint-plugin": "^6.13.1",
64-
"astro": "^4.0.1",
63+
"astro": "^5.0.9",
6564
"bumpp": "^9.2.0",
6665
"eslint": "^8.54.0",
6766
"esno": "^4.0.0",
6867
"https-localhost": "^4.7.1",
69-
"typescript": "^5.4.5",
70-
"unbuild": "^2.0.0",
68+
"typescript": "^5.7.2",
69+
"unbuild": "^3.0.1",
7170
"vite": "^5.0.0"
71+
},
72+
"pnpm": {
73+
"overrides": {
74+
"sharp": "0.32.6",
75+
"sharp-ico": "0.1.5"
76+
}
7277
}
7378
}

0 commit comments

Comments
 (0)