When developing locally it was really annoying to have to rebuild and dump the browser cache when making changes to the project, which was necessary because we generate a service worker for the project, effectively caching the essential files to run the app offline.
The need for webpack configuration to support hot reloading locally was obvious, so that's exactly what this PR adds.
Creates common webpack config
Merges common config in the dev and prod custom webpack configs
Configures the service worker to be configured only in prod
Testing
npm run dev
Project should start on 9000
Make a change somewhere in the project
Locally run project should update - no sw errors should crash the browser
When developing locally it was really annoying to have to rebuild and dump the browser cache when making changes to the project, which was necessary because we generate a service worker for the project, effectively caching the essential files to run the app offline.
The need for webpack configuration to support hot reloading locally was obvious, so that's exactly what this PR adds.
common
webpack configcommon
config in thedev
andprod
custom webpack configsprod
Testing
npm run dev