Push notifications are short messages that a backend server delivers to a user's device through the OS-level push service, displayed even when the corresponding app is not running. Push is the standard re-engagement and real-time messaging channel on mobile and increasingly on web.

How it works

The app registers with the OS push service (APNs on iOS, FCM on Android, Web Push on browsers) and…

vite pwa pluginでreact router v7がpwaにできない理由を調べてみた
  • React Router v7で作成したウェブアプリをPWA(インストールに対応のみ)にする
  • ローカルのvite-plugin-pwaを、手元のReact Router v7プロジェクトで直接利用する方法

過去にreact router v7がvite-pwa-pluginでpwa化できないと言うことを言ってきた。

実際のIssueはFeature Request: Vite PWA Support for React Router 7 #809←こちら。

問題の現象

まず起きている事象としては、

  • manifestの作成はできているけど、
    -…
Read more →
React Router v7で作成したウェブアプリをPWA(インストールに対応のみ)にする

⚠️追記:vite-plugin-pwaはとReact Router v7で正常に機能しません

...

React Router v7でウェブアプリを作成した。

Kindle Unlimitedの検索が使いにくいので、好きな作家の対象本を一覧表示するサービスを作った

これを少しずつ改良しているんだけど、サイトに訪問するのが面倒なのでPWAにすることにした。

環境

PWAにしたアプリの環境は下記の通り。

PWAにする

vite-plugin-pwaをインストールする。

vite.config.tsのpluginsにvite-plugin-pwaを追加する。

上記の記述でビルド時にmanifest.webmanifestが生成されるのでそれをapp/root.tsxで読み込む。

で、必要となる下記を作成する。

テストする

PWAは開発環境でテストできないので、npm…

Read more →
Page 1