Skip to content

Commit

Permalink
chore: update license and usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Mar 22, 2024
1 parent ee9239b commit e838ad1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-PRESENT Anthony Fu <https://github.com/antfu>
Copyright (c) 2024-PRESENT Anthony Fu <https://github.com/antfu>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,28 @@ pnpm add @vite-pwa/remix -D

## 🦄 Usage

Add `@vite-pwa/remix` plugin to `vite.config.js` and configure it:
Import the `@vite-pwa/remix` helper, create the Remix PWA Preset and the PWA Plugin and configure them in your Vite configuration file:

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

installGlobals()

const { RemixVitePWAPlugin, RemixPWAPreset } = RemixVitePWA()

export default defineConfig({
plugins: [RemixPWAPlugin({
// Your Remix plugin options
pwa: {
// PWA options
}
})]
plugins: [
remix({
presets: [RemixPWAPreset()],
}),
RemixVitePWAPlugin({
// PWA options
})
]
})
```
Read the [📖 documentation](https://vite-pwa-org.netlify.app/frameworks/remix) for a complete guide on how to configure and use
Expand Down

0 comments on commit e838ad1

Please sign in to comment.