Comments (10)
you need to add an svg (or png) to your public folder, then configure pwaAssets
in your pwa options to build all pwa stuff, check the example where we use external pwa assets configuration file (https://github.com/QwikDev/pwa/blob/main/example/pwa-assets.config.ts): add pwaAssets: true
(you can also inline pwa assets configuration)
from pwa.
Hey, Thank you so much for the issue, can we have a stackblitz reproduction?
from pwa.
@Jauharmuhammed can you try adding "@qwikdev/pwa"
to your ts config file (compilerOptions.types
array)? ("vite/client"
should be also there )
"compileOptions": {
"types": ["vite/client", "@qwikdev/pwa"]
}
If not using TypeScript, try adding vite-env.d.ts
in your src folder adding triple slash reference:
// vite-env.d.ts
/// <reference types="@qwikdev/pwa" />
from pwa.
@userquin I have tried adding what you suggested, still the same issue
@Aslemammad I have added a link to the stackblitz reproduction in the description
from pwa.
Thank you so much! @userquin what do you think?
from pwa.
@Jauharmuhammed you need to add qwikPwa
plugin to Vite plugins, missing in the playground (updated link):
/**
* This is the base config for vite.
* When building, the adapter config is used which loads this file and extends it.
*/
import { defineConfig } from 'vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { qwikCity } from '@builder.io/qwik-city/vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { qwikPwa } from "@qwikdev/pwa"; // <== add this import
/**
* Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at `src/entry.ssr.tsx` instead.
*/
export default defineConfig(() => {
return {
define: {
// (optional) enables debugging in workbox
'process.env.NODE_ENV': JSON.stringify('development'),
},
plugins: [qwikCity(), qwikVite(), tsconfigPaths(), qwikPwa({/* pwa options */})], // <== and the pwa plugin here
};
});
from pwa.
I missed that, the project is running fine now, but it not PWA compatible!
The icon to install the pwa is not showing up and I tested with lighthouse as well
from pwa.
@Aslemammad we should add pwa assets configuration to the readme file
from pwa.
@Jauharmuhammed check this page as small guide https://vite-pwa-org.netlify.app/assets-generator/integrations.html (not 100% compatible, since qwikdev pwa using custom integration)
Check also pwaAssets
option here https://vite-pwa-org.netlify.app/assets-generator/integrations.html#pwa-assets-options
from pwa.
@Aslemammad we should add pwa assets configuration to the readme file
I agree, we should do that.
from pwa.
Related Issues (6)
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 pwa.