I have an existing app I'm trying to convert to use React. I've copied its functionality with a brand new create-react-app one (using react-scripts 1.0.13).
I want to use the existing service worker I have. I've noticed CRA creates its own service worker; there is code in the webpack config (using SWPrecacheWebpackPlugin) that creates an unbundled module, service-worker.js. All other JS modules are bundled together.
From what I understand, I can't just copy my existing service worker existing-service-worker.js and try to import that, as all JS modules are bundled together.
I don't want to eject.
I've forked create-react-app in order to customise react-scripts and use different logic in the webpack config, which will allow me to use my existing service worker instead of the one it creates with SWPrecacheWebpackPlugin... However, I don't know how to do this. This is my first time using React and webpack.
Can someone point me in the right direction, and help me use my existing service worker in React, without ejecting?