unplugin-pwa-nuxt 0.0.0-stage → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +96 -2
- package/dist/index.d.ts +10 -0
- package/dist/index.js +59 -0
- package/dist/models/ModuleOptions.d.ts +9 -0
- package/dist/runtime/constants.d.ts +2 -0
- package/dist/runtime/constants.js +4 -0
- package/dist/runtime/createPwaPlugin.d.ts +11 -0
- package/dist/runtime/createPwaPlugin.js +37 -0
- package/dist/runtime/models/Pwa.d.ts +6 -0
- package/dist/runtime/models/Pwa.js +1 -0
- package/dist/runtime/models/UseRegisterSW.d.ts +10 -0
- package/dist/runtime/models/UseRegisterSW.js +1 -0
- package/dist/services/buildServiceWorker.js +34 -0
- package/dist/services/configurePwaOptions.js +27 -0
- package/dist/services/createManifestTransform.js +25 -0
- package/dist/services/createNavigationDenylistPlugin.js +13 -0
- package/dist/services/createWorkboxWindowPlugin.js +12 -0
- package/dist/services/getImmutableAssets.js +4 -0
- package/dist/services/getNavigationDenylist.js +26 -0
- package/dist/services/getNitroNavigationDenylist.js +5 -0
- package/dist/services/getNitroNavigationRoutes.js +3 -0
- package/dist/services/getStrategyOptions.js +10 -0
- package/dist/services/getTypeTemplate.js +20 -0
- package/dist/services/getVitePlugins.js +18 -0
- package/navigation-denylist.d.ts +5 -0
- package/package.json +67 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2020-present Jimmy Chen
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# unplugin-pwa-nuxt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[![Apache-2.0 licensed][badge-license]][url-license]
|
|
4
|
+
[![NPM version][badge-npm-version]][url-npm]
|
|
5
|
+
[![NPM downloads][badge-npm-downloads]][url-npm]
|
|
6
|
+
[![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
|
|
7
|
+
|
|
8
|
+
This package is a Nuxt PWA module on [`@unplugin-pwa/vite`](https://github.com/vite-pwa/unplugin-pwa), for Nuxt 5 and Nitro 3 only. It builds your service worker once Nitro has copied the app into its public folder, so its precache lists every file the server serves, keeps the worker from answering a navigation to a route your server owns, links the manifest in the page's head and registers the worker with a client plugin that provides `$pwa`.
|
|
9
|
+
|
|
10
|
+
Design notes live in [the specs](https://github.com/Esposter/Esposter/tree/main/openspec/specs/unplugin-pwa-nuxt).
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
|
|
14
|
+
- 🚀 [Getting Started](#getting-started)
|
|
15
|
+
- 🧩 [Key Exports](#key-exports)
|
|
16
|
+
- 📝 [Usage](#usage)
|
|
17
|
+
- ⚖️ [License](#license)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## <a name="getting-started">🚀 Getting Started</a>
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm i unplugin-pwa-nuxt
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// nuxt.config.ts
|
|
29
|
+
export default defineNuxtConfig({ modules: ["unplugin-pwa-nuxt"] });
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## <a name="key-exports">🧩 Key Exports</a>
|
|
33
|
+
|
|
34
|
+
| Export | Kind | Purpose |
|
|
35
|
+
| :---------------------------------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------ |
|
|
36
|
+
| `default` | const | The Nuxt module, set up from the `pwa` config key |
|
|
37
|
+
| `ModuleOptions` | interface | The engine's own options, typed and unchanged, plus `periodicSyncForUpdates`, the seconds between checks for a newer worker |
|
|
38
|
+
| `Pwa` | interface | `$pwa`, with `needRefresh`, `offlineReady`, `registrationError` and `updateServiceWorker()` |
|
|
39
|
+
| `virtual:unplugin-pwa-nuxt/navigation-denylist` | module | The server's routes as `RegExp`s, imported by a worker built from source; its types are `unplugin-pwa-nuxt/navigation-denylist` |
|
|
40
|
+
|
|
41
|
+
## <a name="usage">📝 Usage</a>
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
// nuxt.config.ts
|
|
45
|
+
export default defineNuxtConfig({
|
|
46
|
+
modules: ["unplugin-pwa-nuxt"],
|
|
47
|
+
pwa: {
|
|
48
|
+
// The worker is TypeScript, built with its precache list injected
|
|
49
|
+
buildSW: { swSrc: "service-worker/sw.ts" },
|
|
50
|
+
manifest: { name: "My app", short_name: "App", theme_color: "#ffffff" },
|
|
51
|
+
// A new worker waits until `$pwa.updateServiceWorker()` is called
|
|
52
|
+
registerType: "prompt",
|
|
53
|
+
strategies: "buildSW",
|
|
54
|
+
// Checks for a newer worker hourly, so a tab left open for days is offered it
|
|
55
|
+
periodicSyncForUpdates: 3600,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
// service-worker/sw.ts
|
|
62
|
+
/// <reference types="unplugin-pwa-nuxt/navigation-denylist" />
|
|
63
|
+
import { navigationDenylist } from "virtual:unplugin-pwa-nuxt/navigation-denylist";
|
|
64
|
+
import { createHandlerBoundToURL, precacheAndRoute } from "@vite-pwa/workbox-swkit/precaching";
|
|
65
|
+
import { NavigationRoute, registerRoute } from "@vite-pwa/workbox-swkit/routing";
|
|
66
|
+
|
|
67
|
+
declare let self: ServiceWorkerGlobalScope & { __WB_MANIFEST: { revision: null | string; url: string }[] };
|
|
68
|
+
|
|
69
|
+
precacheAndRoute([...self.__WB_MANIFEST, { revision: null, url: "/" }]);
|
|
70
|
+
// An API route or a file the server serves is the server's to answer, not the shell's
|
|
71
|
+
registerRoute(new NavigationRoute(createHandlerBoundToURL("/"), { denylist: navigationDenylist }));
|
|
72
|
+
// `$pwa.updateServiceWorker()` sends this message, and a worker built from source is the one that must act on it
|
|
73
|
+
self.addEventListener("message", (event) => {
|
|
74
|
+
if (event.data?.type === "SKIP_WAITING") event.waitUntil(self.skipWaiting());
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```vue
|
|
79
|
+
<script setup lang="ts">
|
|
80
|
+
const { $pwa } = useNuxtApp();
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<button v-if="$pwa?.needRefresh" @click="$pwa.updateServiceWorker()">Reload for the new version</button>
|
|
85
|
+
</template>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## <a name="license">⚖️ License</a>
|
|
89
|
+
|
|
90
|
+
Licensed under [Apache-2.0][url-license].
|
|
91
|
+
|
|
92
|
+
[badge-license]: https://img.shields.io/github/license/Esposter/Esposter.svg?color=blue
|
|
93
|
+
[url-license]: https://github.com/Esposter/Esposter/blob/main/LICENSE
|
|
94
|
+
[badge-npm-version]: https://img.shields.io/npm/v/unplugin-pwa-nuxt/latest?color=brightgreen
|
|
95
|
+
[url-npm]: https://www.npmjs.com/package/unplugin-pwa-nuxt/v/latest
|
|
96
|
+
[badge-npm-unpacked-size]: https://img.shields.io/npm/unpacked-size/unplugin-pwa-nuxt/latest?label=npm
|
|
97
|
+
[badge-npm-downloads]: https://img.shields.io/npm/dm/unplugin-pwa-nuxt.svg
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ModuleOptions } from "./models/ModuleOptions.js";
|
|
2
|
+
import { Pwa } from "./runtime/models/Pwa.js";
|
|
3
|
+
import { NuxtModule } from "@nuxt/schema";
|
|
4
|
+
declare module "@nuxt/schema" {
|
|
5
|
+
interface NuxtConfig {
|
|
6
|
+
pwa?: ModuleOptions;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare const pwaModule: NuxtModule<ModuleOptions>;
|
|
10
|
+
export { type ModuleOptions, type Pwa, pwaModule as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { MODULE_NAME } from "./runtime/constants.js";
|
|
2
|
+
import { buildServiceWorker } from "./services/buildServiceWorker.js";
|
|
3
|
+
import { configurePwaOptions } from "./services/configurePwaOptions.js";
|
|
4
|
+
import { getNitroNavigationDenylist } from "./services/getNitroNavigationDenylist.js";
|
|
5
|
+
import { getTypeTemplate } from "./services/getTypeTemplate.js";
|
|
6
|
+
import { getVitePlugins } from "./services/getVitePlugins.js";
|
|
7
|
+
import { addPluginTemplate, addTypeTemplate, addVitePlugin, createResolver, defineNuxtModule } from "@nuxt/kit";
|
|
8
|
+
import { createCustomVitePWAContext } from "@unplugin-pwa/vite/vite-context";
|
|
9
|
+
// src/module.ts
|
|
10
|
+
const pwaModule = defineNuxtModule({
|
|
11
|
+
defaults: ({ options }) => ({
|
|
12
|
+
base: options.app.baseURL,
|
|
13
|
+
scope: options.app.baseURL
|
|
14
|
+
}),
|
|
15
|
+
meta: {
|
|
16
|
+
compatibility: { nuxt: ">=5.0.0-0" },
|
|
17
|
+
configKey: "pwa",
|
|
18
|
+
name: MODULE_NAME
|
|
19
|
+
},
|
|
20
|
+
setup({ periodicSyncForUpdates, ...pwaOptions }, nuxt) {
|
|
21
|
+
if (pwaOptions.disable) return;
|
|
22
|
+
const resolver = createResolver(import.meta.url);
|
|
23
|
+
const { baseURL } = nuxt.options.app;
|
|
24
|
+
const { manifest, manifestFilename = "manifest.webmanifest", useCredentials } = pwaOptions;
|
|
25
|
+
if (manifest) {
|
|
26
|
+
const { head } = nuxt.options.app;
|
|
27
|
+
head.link = [...head.link ?? [], {
|
|
28
|
+
href: `${baseURL}${manifestFilename}`,
|
|
29
|
+
rel: "manifest",
|
|
30
|
+
...useCredentials && { crossorigin: "use-credentials" }
|
|
31
|
+
}];
|
|
32
|
+
}
|
|
33
|
+
addPluginTemplate({
|
|
34
|
+
filename: `${MODULE_NAME}.client.mjs`,
|
|
35
|
+
getContents: () => [
|
|
36
|
+
"import { useRegisterSW } from 'virtual:pwa-register/vue'",
|
|
37
|
+
`import { createPwaPlugin } from ${JSON.stringify(resolver.resolve("./runtime/createPwaPlugin"))}`,
|
|
38
|
+
"",
|
|
39
|
+
`export default createPwaPlugin(useRegisterSW, ${JSON.stringify(periodicSyncForUpdates)})`,
|
|
40
|
+
""
|
|
41
|
+
].join("\n"),
|
|
42
|
+
mode: "client"
|
|
43
|
+
});
|
|
44
|
+
addTypeTemplate({
|
|
45
|
+
filename: `types/${MODULE_NAME}.d.ts`,
|
|
46
|
+
getContents: getTypeTemplate
|
|
47
|
+
});
|
|
48
|
+
const context = createCustomVitePWAContext("vite", true, {
|
|
49
|
+
...pwaOptions,
|
|
50
|
+
injectRegister: false
|
|
51
|
+
});
|
|
52
|
+
addVitePlugin(() => getVitePlugins(context), { server: false });
|
|
53
|
+
nuxt.hook("nitro:init", (nitro) => {
|
|
54
|
+
context.configurePWAOptions = () => configurePwaOptions(context, nuxt, nitro.options.output.publicDir, () => getNitroNavigationDenylist(nitro));
|
|
55
|
+
nuxt.hook("nitro:build:public-assets", () => buildServiceWorker(context, nuxt, nitro));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export { pwaModule as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VitePWAOptions, VitePWAStrategy } from "@unplugin-pwa/core";
|
|
2
|
+
import { SWType } from "@vite-pwa/workbox-build/types";
|
|
3
|
+
export interface ModuleOptions extends Partial<VitePWAOptions<VitePWAStrategy, SWType>> {
|
|
4
|
+
/**
|
|
5
|
+
* Seconds between checks for a new service worker. Absent, only the browser's own navigation check runs.
|
|
6
|
+
*/
|
|
7
|
+
periodicSyncForUpdates?: number;
|
|
8
|
+
pwaAssets?: never;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Pwa } from "./models/Pwa.js";
|
|
2
|
+
import { UseRegisterSW } from "./models/UseRegisterSW.js";
|
|
3
|
+
import { ObjectPlugin } from "nuxt/app";
|
|
4
|
+
/**
|
|
5
|
+
* Registers the worker, through `useRegisterSW` from the engine's register module, once the app is up and provides `$pwa`: whether a new worker waits (`needRefresh`) or the
|
|
6
|
+
* app can now run offline (`offlineReady`), and how to activate the waiting one. `periodicSyncForUpdates` is the
|
|
7
|
+
* seconds between checks for a newer worker, none when absent.
|
|
8
|
+
*/
|
|
9
|
+
export declare const createPwaPlugin: (useRegisterSW: UseRegisterSW, periodicSyncForUpdates?: number) => ObjectPlugin<{
|
|
10
|
+
pwa: Pwa;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MODULE_NAME } from "./constants.js";
|
|
2
|
+
import { getResultAsync, getSynchronizedFunction, noop } from "@esposter/shared";
|
|
3
|
+
import { defineNuxtPlugin } from "nuxt/app";
|
|
4
|
+
import { reactive, ref } from "vue";
|
|
5
|
+
// src/runtime/createPwaPlugin.ts
|
|
6
|
+
/**
|
|
7
|
+
* Registers the worker, through `useRegisterSW` from the engine's register module, once the app is up and provides `$pwa`: whether a new worker waits (`needRefresh`) or the
|
|
8
|
+
* app can now run offline (`offlineReady`), and how to activate the waiting one. `periodicSyncForUpdates` is the
|
|
9
|
+
* seconds between checks for a newer worker, none when absent.
|
|
10
|
+
*/
|
|
11
|
+
const createPwaPlugin = (useRegisterSW, periodicSyncForUpdates) => defineNuxtPlugin({
|
|
12
|
+
enforce: "post",
|
|
13
|
+
name: `${MODULE_NAME}:client`,
|
|
14
|
+
parallel: true,
|
|
15
|
+
setup() {
|
|
16
|
+
const registrationError = ref(false);
|
|
17
|
+
const { needRefresh, offlineReady, updateServiceWorker } = useRegisterSW({
|
|
18
|
+
immediate: true,
|
|
19
|
+
onRegisteredSW: (_swUrl, registration) => {
|
|
20
|
+
if (!registration || !periodicSyncForUpdates) return;
|
|
21
|
+
setInterval(getSynchronizedFunction(async () => {
|
|
22
|
+
if (window.navigator.onLine && !registration.installing) await getResultAsync(() => registration.update()).match(noop, console.error);
|
|
23
|
+
}), periodicSyncForUpdates * 1e3);
|
|
24
|
+
},
|
|
25
|
+
onRegisterError: () => {
|
|
26
|
+
registrationError.value = true;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return { provide: { pwa: reactive({
|
|
30
|
+
needRefresh,
|
|
31
|
+
offlineReady,
|
|
32
|
+
registrationError,
|
|
33
|
+
updateServiceWorker
|
|
34
|
+
}) } };
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export { createPwaPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
export type UseRegisterSW = (options: {
|
|
3
|
+
immediate: boolean;
|
|
4
|
+
onRegisteredSW: (swUrl: string, registration?: ServiceWorkerRegistration) => void;
|
|
5
|
+
onRegisterError: (error: unknown) => void;
|
|
6
|
+
}) => {
|
|
7
|
+
needRefresh: Ref<boolean>;
|
|
8
|
+
offlineReady: Ref<boolean>;
|
|
9
|
+
updateServiceWorker: () => Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createManifestTransform } from "./createManifestTransform.js";
|
|
2
|
+
import { getImmutableAssets } from "./getImmutableAssets.js";
|
|
3
|
+
import { getNitroNavigationDenylist } from "./getNitroNavigationDenylist.js";
|
|
4
|
+
import { getStrategyOptions } from "./getStrategyOptions.js";
|
|
5
|
+
import { globSync } from "node:fs";
|
|
6
|
+
// src/services/buildServiceWorker.ts
|
|
7
|
+
const PAYLOAD_PATTERN = "**/_payload.json";
|
|
8
|
+
/**
|
|
9
|
+
* The worker is built from what Nitro has already copied into its public folder, which is every file the precache
|
|
10
|
+
* lists, so it is built here and not as the client bundle closes. What the precache holds and where a navigation falls
|
|
11
|
+
* back to are settled here too, since they depend on what Nitro prerendered and which routes the server answers.
|
|
12
|
+
*/
|
|
13
|
+
const buildServiceWorker = async (context, nuxt, nitro) => {
|
|
14
|
+
if (context.resolvedOptions.disable) return;
|
|
15
|
+
const { baseURL } = nuxt.options.app;
|
|
16
|
+
const immutableAssets = getImmutableAssets(nuxt);
|
|
17
|
+
const options = getStrategyOptions(context);
|
|
18
|
+
if (options) {
|
|
19
|
+
const payloadPatterns = globSync(PAYLOAD_PATTERN, { cwd: nitro.options.output.publicDir }).length > 0 ? [PAYLOAD_PATTERN] : [];
|
|
20
|
+
options.globPatterns ??= [
|
|
21
|
+
"**/*.{js,css,html}",
|
|
22
|
+
...payloadPatterns,
|
|
23
|
+
`${immutableAssets}/builds/meta/*.json`
|
|
24
|
+
];
|
|
25
|
+
options.manifestTransforms ??= [createManifestTransform(baseURL, `${immutableAssets}/`)];
|
|
26
|
+
}
|
|
27
|
+
const { generateSW } = context.resolvedOptions;
|
|
28
|
+
if (context.strategy === "generate-sw" && generateSW) {
|
|
29
|
+
if (!("navigateFallback" in generateSW)) generateSW.navigateFallback = baseURL;
|
|
30
|
+
generateSW.navigateFallbackDenylist ??= getNitroNavigationDenylist(nitro);
|
|
31
|
+
}
|
|
32
|
+
await context.runBuild();
|
|
33
|
+
};
|
|
34
|
+
export { buildServiceWorker };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createNavigationDenylistPlugin } from "./createNavigationDenylistPlugin.js";
|
|
2
|
+
import { getImmutableAssets } from "./getImmutableAssets.js";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
// src/services/configurePwaOptions.ts
|
|
5
|
+
/**
|
|
6
|
+
* Where the engine resolves its options, the paths a Nuxt app fixes: the worker is written into the folder Nitro
|
|
7
|
+
* serves, and a worker built from source can import the server's navigation denylist. `getNavigationDenylist` is read
|
|
8
|
+
* as the worker is built, since the server's routes are only settled by then. The engine reads the manifest's icons from
|
|
9
|
+
* Vite's `publicDir`, which Nuxt turns off since Nitro serves the folder, so it is Nuxt's own public folder here.
|
|
10
|
+
*/
|
|
11
|
+
const configurePwaOptions = (context, nuxt, outDir, getNavigationDenylist) => {
|
|
12
|
+
const { buildSW } = context.resolvedOptions;
|
|
13
|
+
context.publicDir = resolve(nuxt.options.rootDir, nuxt.options.dir.public);
|
|
14
|
+
if (buildSW) {
|
|
15
|
+
const { plugins } = buildSW;
|
|
16
|
+
buildSW.plugins = (swType) => [plugins?.(swType), createNavigationDenylistPlugin(getNavigationDenylist)];
|
|
17
|
+
}
|
|
18
|
+
if (context.devEnvironment) return void 0;
|
|
19
|
+
context.outDir = outDir;
|
|
20
|
+
context.resolvedOptions.outDir = outDir;
|
|
21
|
+
return {
|
|
22
|
+
cwd: process.cwd(),
|
|
23
|
+
immutableAssets: getImmutableAssets(nuxt),
|
|
24
|
+
outDir
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export { configurePwaOptions };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/services/createManifestTransform.ts
|
|
2
|
+
const HTML_SUFFIX_REGEX = /(?:^|\/)index\.html$|\.html$/u;
|
|
3
|
+
/**
|
|
4
|
+
* Nuxt serves a prerendered page at its route, not at its file, so a precached `about/index.html` or `about.html` is
|
|
5
|
+
* keyed as `about` and the entry for the app's own `index.html` as the base URL. A build's app manifest is named by its
|
|
6
|
+
* content, so its revision is the name and workbox never re-downloads one it already holds.
|
|
7
|
+
*/
|
|
8
|
+
const createManifestTransform = (baseURL, buildAssetsDirectory) => (entries) => ({
|
|
9
|
+
manifest: entries.map((entry) => {
|
|
10
|
+
if (entry.url.endsWith(".html")) {
|
|
11
|
+
const route = entry.url.replace(HTML_SUFFIX_REGEX, "");
|
|
12
|
+
return {
|
|
13
|
+
...entry,
|
|
14
|
+
url: route === "" ? baseURL : route
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
if (entry.url.startsWith(`${buildAssetsDirectory}builds/meta/`)) return {
|
|
18
|
+
...entry,
|
|
19
|
+
revision: null
|
|
20
|
+
};
|
|
21
|
+
return entry;
|
|
22
|
+
}),
|
|
23
|
+
warnings: []
|
|
24
|
+
});
|
|
25
|
+
export { createManifestTransform };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NAVIGATION_DENYLIST_MODULE } from "../runtime/constants.js";
|
|
2
|
+
// src/services/createNavigationDenylistPlugin.ts
|
|
3
|
+
const RESOLVED_NAVIGATION_DENYLIST_MODULE = `\0${NAVIGATION_DENYLIST_MODULE}`;
|
|
4
|
+
const createNavigationDenylistPlugin = (getNavigationDenylist) => ({
|
|
5
|
+
load(id) {
|
|
6
|
+
if (id === RESOLVED_NAVIGATION_DENYLIST_MODULE) return `export const navigationDenylist = [${getNavigationDenylist().join(",")}];`;
|
|
7
|
+
},
|
|
8
|
+
name: "unplugin-pwa-nuxt:navigation-denylist",
|
|
9
|
+
resolveId(id) {
|
|
10
|
+
if (id === "virtual:unplugin-pwa-nuxt/navigation-denylist") return RESOLVED_NAVIGATION_DENYLIST_MODULE;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export { createNavigationDenylistPlugin };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MODULE_NAME } from "../runtime/constants.js";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
// src/services/createWorkboxWindowPlugin.ts
|
|
4
|
+
const WORKBOX_WINDOW_SPECIFIERS = /* @__PURE__ */ new Set(["@vite-pwa/workbox-window", "@vite-pwa/workbox-window/esm-sw-detector"]);
|
|
5
|
+
const createWorkboxWindowPlugin = () => ({
|
|
6
|
+
enforce: "pre",
|
|
7
|
+
name: `${MODULE_NAME}:workbox-window`,
|
|
8
|
+
resolveId(id) {
|
|
9
|
+
if (WORKBOX_WINDOW_SPECIFIERS.has(id)) return fileURLToPath(import.meta.resolve(id));
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export { createWorkboxWindowPlugin };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/services/getNavigationDenylist.ts
|
|
2
|
+
const CATCH_ALL_ROUTES = /* @__PURE__ */ new Set([
|
|
3
|
+
"",
|
|
4
|
+
"/",
|
|
5
|
+
"/**"
|
|
6
|
+
]);
|
|
7
|
+
const MULTI_SEGMENT_WILDCARD = "**";
|
|
8
|
+
const MULTI_SEGMENT_PATTERN = "(?:/.*)?";
|
|
9
|
+
const SINGLE_SEGMENT_PATTERN = "/[^/]+";
|
|
10
|
+
const getSegmentPattern = (segment) => {
|
|
11
|
+
if (segment.startsWith(MULTI_SEGMENT_WILDCARD)) return MULTI_SEGMENT_PATTERN;
|
|
12
|
+
if (segment.startsWith(":") || segment.startsWith("*")) return SINGLE_SEGMENT_PATTERN;
|
|
13
|
+
return RegExp.escape(`/${segment}`);
|
|
14
|
+
};
|
|
15
|
+
const splitSegments = (path) => path.split("/").filter(Boolean);
|
|
16
|
+
/**
|
|
17
|
+
* The paths a navigation must not be answered with the app shell for: the server's own routes, which the worker would
|
|
18
|
+
* otherwise swallow into the cached page. Each route becomes one anchored pattern, so `/api/**` denies `/api` and what
|
|
19
|
+
* is under it but never `/apiary`, and the list is deduplicated and sorted so the generated worker is the same on every
|
|
20
|
+
* build.
|
|
21
|
+
*/
|
|
22
|
+
const getNavigationDenylist = (routes, baseURL) => {
|
|
23
|
+
const baseSegments = splitSegments(baseURL);
|
|
24
|
+
return [...new Set(routes.filter((route) => !CATCH_ALL_ROUTES.has(route)).map((route) => `^${[...baseSegments.map((segment) => RegExp.escape(`/${segment}`)), ...splitSegments(route).map((segment) => getSegmentPattern(segment))].join("")}$`))].toSorted().map((source) => new RegExp(source, "u"));
|
|
25
|
+
};
|
|
26
|
+
export { getNavigationDenylist };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { getNavigationDenylist } from "./getNavigationDenylist.js";
|
|
2
|
+
import { getNitroNavigationRoutes } from "./getNitroNavigationRoutes.js";
|
|
3
|
+
// src/services/getNitroNavigationDenylist.ts
|
|
4
|
+
const getNitroNavigationDenylist = (nitro) => getNavigationDenylist(getNitroNavigationRoutes(nitro), nitro.options.baseURL);
|
|
5
|
+
export { getNitroNavigationDenylist };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/services/getStrategyOptions.ts
|
|
2
|
+
const getStrategyOptions = ({ resolvedOptions, strategy }) => {
|
|
3
|
+
switch (strategy) {
|
|
4
|
+
case "build-sw": return resolvedOptions.buildSW;
|
|
5
|
+
case "generate-sw": return resolvedOptions.generateSW;
|
|
6
|
+
case "inject-manifest": return resolvedOptions.injectManifest;
|
|
7
|
+
default: return;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export { getStrategyOptions };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MODULE_NAME } from "../runtime/constants.js";
|
|
2
|
+
// src/services/getTypeTemplate.ts
|
|
3
|
+
const getTypeTemplate = () => `// Generated by ${MODULE_NAME}
|
|
4
|
+
import type { Pwa } from '${MODULE_NAME}'
|
|
5
|
+
|
|
6
|
+
declare module '#app' {
|
|
7
|
+
interface NuxtApp {
|
|
8
|
+
$pwa?: Pwa
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module 'vue' {
|
|
13
|
+
interface ComponentCustomProperties {
|
|
14
|
+
$pwa?: Pwa
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {}
|
|
19
|
+
`;
|
|
20
|
+
export { getTypeTemplate };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createWorkboxWindowPlugin } from "./createWorkboxWindowPlugin.js";
|
|
2
|
+
import { BuildPwaAssetsPlugin } from "@unplugin-pwa/vite/plugins/build-pwa-assets";
|
|
3
|
+
import { DevPlugin } from "@unplugin-pwa/vite/plugins/dev";
|
|
4
|
+
import { DevMiddlewarePlugin } from "@unplugin-pwa/vite/plugins/dev-middleware";
|
|
5
|
+
import { InfoPlugin } from "@unplugin-pwa/vite/plugins/info";
|
|
6
|
+
import { MainPlugin } from "@unplugin-pwa/vite/plugins/main";
|
|
7
|
+
import { VirtualModulesPlugin } from "@unplugin-pwa/vite/plugins/virtual-modules";
|
|
8
|
+
// src/services/getVitePlugins.ts
|
|
9
|
+
const getVitePlugins = (context) => [
|
|
10
|
+
MainPlugin(context),
|
|
11
|
+
VirtualModulesPlugin(context),
|
|
12
|
+
InfoPlugin(context),
|
|
13
|
+
DevPlugin(context),
|
|
14
|
+
DevMiddlewarePlugin(context),
|
|
15
|
+
BuildPwaAssetsPlugin(context),
|
|
16
|
+
createWorkboxWindowPlugin()
|
|
17
|
+
];
|
|
18
|
+
export { getVitePlugins };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// The server's routes as patterns, which a service worker built from source imports to leave a navigation to one to the
|
|
2
|
+
// Server. The module resolves it as the worker is built
|
|
3
|
+
declare module "virtual:unplugin-pwa-nuxt/navigation-denylist" {
|
|
4
|
+
export const navigationDenylist: RegExp[];
|
|
5
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-pwa-nuxt",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.5.0",
|
|
4
|
+
"description": "Nuxt PWA module on unplugin-pwa — a service worker built by the app, its manifest and its client plugin, for Nuxt 5 and Nitro 3 only",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/Esposter/Esposter/blob/main/packages/unplugin-pwa-nuxt#readme",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/Esposter/Esposter/issues"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"author": "Jimmy Chen",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/Esposter/Esposter.git"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"navigation-denylist.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"imports": {
|
|
26
|
+
"#src/*": "./src/*.ts"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": "./dist/index.js",
|
|
30
|
+
"./package.json": "./package.json",
|
|
31
|
+
"./navigation-denylist": {
|
|
32
|
+
"types": "./navigation-denylist.d.ts"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsdown",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"lint:fix": "eslint --fix .",
|
|
42
|
+
"test": "vitest",
|
|
43
|
+
"typecheck": "tsrs --fast"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@esposter/shared": "4.5.0",
|
|
47
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@5x",
|
|
48
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@5x",
|
|
49
|
+
"@unplugin-pwa/core": "^0.0.3",
|
|
50
|
+
"@unplugin-pwa/vite": "^0.0.3",
|
|
51
|
+
"@vite-pwa/workbox-build": "^8.0.13",
|
|
52
|
+
"@vite-pwa/workbox-window": "^8.0.13"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@esposter/configuration": "4.5.0",
|
|
56
|
+
"@esposter/shared-node": "4.5.0",
|
|
57
|
+
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@5x",
|
|
58
|
+
"@types/node": "^26.6.6",
|
|
59
|
+
"@vite-pwa/workbox-swkit": "^8.0.13",
|
|
60
|
+
"tsdown": "^0.23.5",
|
|
61
|
+
"vite": "^8.3.5"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"nitro": "npm:nitro-nightly@latest",
|
|
65
|
+
"nuxt": "npm:nuxt-nightly@5x",
|
|
66
|
+
"vue": "^3.5.44"
|
|
67
|
+
},
|
|
68
|
+
"gitHead": "e30c001f3b4b15693e75fb53092d62a97ade4d2b"
|
|
69
|
+
}
|