Comments (6)
You're using base: '/app/'
and you're registering the sw scope with /
, remove the scope
from the pwa configuration and update the start_url
to use the base url or configure the base url in some common place and use it to configure the pwa stuff.
Also update the custom sw, you're using /
in allow and deny list and navigation fallback.
from nuxt.
@userquin I made the changes as you mentioned, but I didn't get success.
I use a baseURL /app/
but I also need to use a cdnURL /
, while building my project.
If I remove the base url, everything works normally.
how can i achieve that?
I believe we should look at this cdnURL.
// nuxt.config.js
app: {
baseURL: '/app/',
cdnURL: '/'
},
from nuxt.
@leonardo-melhor-envio upps, I have no idea about that configuration, it seems you have 2 urls, try just adding /
to the pwa scope and start_url
, add also a manifestTransform
to add app/
prefix to any entry: entry.url
EDIT: IIRC you have some option about using a prefix in the injectManifest
configuration option
Maybe you also need to add some headers: vite-pwa/vite-plugin-pwa#467 (comment)
from nuxt.
I experience the same problem, seeing
[Vue Router warn]: No match found for location with path "/dev-sw.js?dev-sw"
[Vue Router warn]: No match found for location with path "/dev-sw.js"
in the console, with "0 config" and with custom pwa
object configurations.
from nuxt.
It looks like #54 is related, but the answer there doesn't work for me, yet.
from nuxt.
Same issue. For me, as long as all options in the devOptions
are removed, the error message disappears.
However, I am not sure if this is the best practice.
...
// remove the devOptions option
devOptions: {
enabled: true,
suppressWarnings: true,
navigateFallbackAllowlist: [/^\/$/],
type: 'module'
}
My repository is here, and I welcome any guidance from anyone.
from nuxt.
Related Issues (20)
- pwa does not cache data in Nuxt 3 SSR HOT 3
- Firefox injectManifest not working HOT 1
- Cannot find module '#pwa' or its corresponding type declarations. HOT 2
- vite-pwa/nuxt not working on ios
- Module does nothing ? (EDIT: No Firefox support ?) HOT 9
- Nuxt3 + PWA warnings in terminal HOT 6
- cant use npm run build
- I can't get 'start_url' to work for me
- showInstallPrompt not being called HOT 1
- Uncaught ReferenceError: __NUXT_ASYNC_CONTEXT__ is not defined HOT 7
- Service Worker "import sentry-release-injection" error when loading page HOT 19
- @vite-pwa/nuxt and vue-tsc conflict HOT 4
- API Request URLs Open in New Tab Redirect to 404 Page HOT 2
- Generate PWA Assets functionality not works when srcDir is not default HOT 15
- Default value of navigateFallbackAllowlist
- offline mode: when I navigate to another route, it shows nothing, but when I refresh then it shows the page from cache HOT 7
- Vite-pwa/nuxt not caching pages on a client-side rendered app HOT 3
- How to handle i18n ? HOT 1
- assets generation not working with nuxt 4 without this workaround HOT 2
- Can only visit url with trailing slash once
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 nuxt.