craco-workbox
Prerequisites
Install craco
Install
yarn add craco-workbox -D
# OR
npm install craco-workbox -S
Usage
- Add the plugin into your craco.config.js;
const CracoWorkboxPlugin = require('craco-workbox');
module.exports = {
plugins: [{
plugin: CracoWorkboxPlugin
}]
}
- Add a workbox.config.js file to your project root containing the overrides you would like to pass. For a full list of options see https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#generatesw_plugin.
module.exports = {
GenerateSW: options => {
return options;
},
InjectManifest: options => {
return options;
}
};
License
Licensed under the MIT License, Copyright ©️ 2019 Kevin S. Perrine. See LICENSE for more information.