vite-pwa / remix

Zero-config PWA Plugin for Remix
https://vite-pwa-org.netlify.app/frameworks/remix
MIT License
50 stars 1 forks source link
pwa remix vite vite-plugin workbox

@vite-pwa/remix - Zero-config PWA Plugin for Remix
Zero-config PWA Plugin for Remix

NPM version NPM Downloads Docs & Guides
GitHub stars


๐Ÿš€ Features

๐Ÿ“ฆ Install

@vite-pwa/remix requires Vite 5 and Remix 2.8.0 or above.

npm i @vite-pwa/remix -D 

# yarn 
yarn add @vite-pwa/remix -D

# pnpm 
pnpm add @vite-pwa/remix -D

๐Ÿฆ„ Usage

Import the @vite-pwa/remix helper, create the Remix PWA Preset and the PWA Plugin and configure them in your Vite configuration file:

// vite.config.js
import { vitePlugin as remix } from '@remix-run/dev'
import { installGlobals } from '@remix-run/node'
import { defineConfig } from 'vite'
import { RemixVitePWA } from '@vite-pwa/remix'

installGlobals()

const { RemixVitePWAPlugin, RemixPWAPreset } = RemixVitePWA()

export default defineConfig({
  plugins: [
    remix({
      presets: [RemixPWAPreset()],
    }),
    RemixVitePWAPlugin({
      // PWA options
    })
  ]
})

Read the ๐Ÿ“– documentation for a complete guide on how to configure and use this plugin.

//: # ()

//: # ()

๐Ÿ‘€ Full config

Check out the following links for more details:

๐Ÿ“„ License

MIT License © 2024-PRESENT Anthony Fu