cm-pwa-react
v8.0.0
Published
Generate files to create a PWA application
Readme
CM PWA React
Internal library for managing updates as a progressive web application in React projects. You can check the npm page.
Installation
npm install --save-dev cm-pwa-react
Usage
Added as a plugin in a Vite config file.
cmPwaReact() returns an array of Vite plugins, so the recommended usage is to spread it into the plugins list:
import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
import {cmPwaReact} from 'cm-pwa-react';
export default defineConfig({
plugins: [
react(),
...cmPwaReact()
]
});You can also customize generation:
export default defineConfig({
plugins: [
react(),
...cmPwaReact({
exclude: [
'/assets/ignore-me.js',
/\/admin\./
]
})
]
});Options
interface NgPWAOptions {
enabled?: boolean;
exclude?: Array<string | RegExp>;
}enabled: enables or disables file generation duringbuild.exclude: excludes additional manifest entries by normalized output path. String values match exact file paths such as/assets/app.js; regular expressions are tested against the normalized manifest path.
Release history and changelog
See the Releases page for a list of all releases, including changes.
Help / Support
If you run into any issues, please email me at [email protected], or you can use the contact form in my page.
For bug reports, please open an issue on GitHub.
Contributing
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Added some feature'). - Push to the branch (
git push origin my-new-feature). - Create a new pull request.
