rescript-service-worker-loader
v1.0.3
Published
Enable service-worker-loader for your create-react-app project.
Downloads
12
Maintainers
Readme
rescript-service-worker-loader
Enable serviceworker-webpack-plugin for your create-react-app project.
Usage
npm i -D rescript-service-worker-loader
Set up rescript as how its document said, then add 'service-worker-loader'
to the list, for example in my .rescriptsrc.js
:
const path = require('path');
module.exports = [
['use-babel-config', '.babelrc'],
['use-eslint-config', '.eslintrc'],
'disable-eslint',
[
'service-worker-loader',
{
entry: path.join(__dirname, 'src/IPFSServiceWorkerGateway/index.js'),
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/ipfs-browser-gateway/',
},
],
];