src/main.tsx
file we can add the DynamicContextProvider with an environment ID
src/App.tsx
file, we can add the DynamicWidget component
vite.config.ts
file with vite-plugin-pwa:
logo.png
and apple-touch-icon.png
to our public
to serve as the PWA icons.
Now we have to specify in the index.html
file some basic information about the PWA:
So, add the following to the head
tag
src/useInstallPWA.ts
that allows us to trigger the PWA installation:
src/main.tsx
file to prompt the user to install the PWA:
https
and install the PWA on your computer or phone, then authenticate with Dynamic!