Skip to content

Enable serviceworker-webpack-plugin for your create-react-app project.

Notifications You must be signed in to change notification settings

linonetwo/rescript-service-worker-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/',
    },
  ],
];

About

Enable serviceworker-webpack-plugin for your create-react-app project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published