webpacker-pwa
v0.1.2
Published
An utility package to change the default Rails Webpacker configuration and add support for Service Workers
Downloads
916
Readme
webpacker-pwa npm package
- Overrides default Webpacker configuration transparently
- Compiles service workers directly in the
public
folder. - Allows to code service workers and use webpack-dev-server.
- No changes are needed server-side
- Works without Sprockets.
Usage
- Install the npm package:
bin/yarn add webpacker-wpa
- Edit
config/webpack/environment.js
:
- Define the service workers folder in
config/webpacker.yml
service_workers_entry_path: service_workers
Start writing your Progressive Rails App! :tada:
Compatibility
The package is doing a lot of changes on the default Webpacker configuration. If some configurations change on Webpacker, this package might need to be updated. The current version has been tested with Webpacker >= 4.0.