Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Example: Treat "mockServiceWorker" as a generated artifact in "with-m…
Browse files Browse the repository at this point in the history
…sw" (vercel#25515)

## Changes

- Removes `mockServiceWorker.js` file and ignores it from Git. New versions of `msw` generate the worker script automatically at the location specified in `packageJson.msw.workerDirectory`. This keeps the worker script up-to-date with the currently installed version of `msw`.
- Updates `msw` package to the latest version for new features and stability improvements.

## Documentation / Examples

- [ ] Make sure the linting passes
  • Loading branch information
kettanaito committed May 27, 2021
1 parent b80e9d5 commit 8967325
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 242 deletions.
1 change: 1 addition & 0 deletions examples/with-msw/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# testing
/coverage
public/mockServiceWorker.js

# next.js
/.next/
Expand Down
5 changes: 4 additions & 1 deletion examples/with-msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
},
"license": "MIT",
"dependencies": {
"msw": "^0.24.2",
"msw": "^0.29.0",
"next": "latest",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"msw": {
"workerDirectory": "public"
}
}
241 changes: 0 additions & 241 deletions examples/with-msw/public/mockServiceWorker.js

This file was deleted.

0 comments on commit 8967325

Please sign in to comment.