Open e16aasc opened 2 months ago
try including pwa plugin and remix-sw types inside app/vite-env.d.ts
via triple slash reference:
// app/vite-env.d.ts
/// <reference types="vite/client" />
/// <reference types="vite-plugin-pwa/client" />
/// <reference types="@vite-pwa/remix/remix-sw" />
I tried the same and it did not work. It works, if you build the library in the root and then install in example.
If you're using latest remix-run version (2.9+), we're trying to fix a problem using tsx components in this repo, you can copy/paste the logic in the root.tsx file or copy index.tsx
, PWAAssets.tsx
and PWAManifest.tsx
from component folder and paste them in your app/components
folder, then change the import in the root.tsx file.
Check this entry in remix discord server: https://discord.com/channels/770287896669978684/1239208602024280076
Anyway, I'm finishing the remix template in @vite-pwa/create-pwa
repo, should fix the problem.
Steps to Reproduce:
remix/examples/pwa-simple-sw
into a separate directory.package.json
, replace"@vite-pwa/remix": "workspace:*"
with"@vite-pwa/remix": "^0.0.1"
.npm i
.npm run dev
.Result:
When attempting to access http://localhost:5173/, an error occurs: