Comments (3)
@feamsr00 virtual:pwa-register/vue
is a Vite virtual module, use it as any other static import; you should add ts definition via vite-plugin-pwa/client
in any d.ts
file inside src folder via reference, for example src/vite-env.d.ts
:
/// <reference types="vite/client" />
/// <reference types="vite-plugin-pwa/client" />
/// <reference types="vite-plugin-pwa/info" />
or add it inside compilerOptions.types
in jsconfig.json
or tsconfig.json
file:
"compilerOptions": {
"types": ["vite/client", "vite-plugin-pwa/client", "vite-plugin-pwa/info"]
}
You can check this Vue component: https://github.com/vite-pwa/vite-plugin-pwa/blob/main/examples/vue-router/src/ReloadPrompt.vue#L2
You can also check the ReloadPrompt.vue component on the docs, just open the code, the static import can be found also there.
from docs.
This this worked much better. Thanks!
May I suggest that this be added to the documentation some how?
from docs.
@feamsr00 it is there:
from docs.
Related Issues (20)
- Typo HOT 6
- Doc around caching strategy is confusing. HOT 4
- How to set ignoreVary for matching cache in ? HOT 2
- self.skipWaiting is not a function HOT 6
- `devTools.enabled` in strategy `generateSW` breaks due to wrong `globDirectory` HOT 1
- No workbox debug logs in with `devtools.enabled` and strategy `injectedManifest` HOT 1
- Where to put the manifest generated data? HOT 4
- [BUG]: custom envPrefix doesn't work when building
- Cleaning local storage on automatic reload
- Add an example to implement Push Notifications? HOT 6
- Is it possible to change the index.html file name?
- Warnings on setting up a new workspace HOT 1
- Server keeps reloading in dev-mode on GET requests
- Create manifest.webmanifest in a sub directory of public HOT 3
- Ability to track download progress?
- Service Worker "import sentry-release-injection" error when loading page
- If I want to create a big data screen, how do I know the website where I installed it?
- when the mode is offline, it should redirect to offline page HOT 1
- offline mode: when I navigate to another route, it shows nothing, but when I refresh then it shows the page from cache HOT 1
- Is there any plan to support Chinese translation? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.