0

I'm trying to run the example from an npm package that uses parcel.

The example uses a url that makes an api call.

To run the example I do: npm test

Below are the 2 attempts that I made to stop the caching. I modify the index.js, kill the local server and restart and it caches no matter what. I'm just looking to run the example and make changes and see the results. It is obviously using the dist folder, but I keep deleting things, but the issue still persists. Any suggestions would be appreciated. Feel free to ask why would I ever want to do this.

package.json

"scripts": {
    "test": "parcel example/index.html --no-cache",
    "patch": "npm version patch --no-git-tag-version",
    "minor": "npm version minor --no-git-tag-version",
    "major": "npm version major --no-git-tag-version"
}
BenM
  • 51,470
  • 24
  • 115
  • 164
zakariah1
  • 302
  • 1
  • 9

1 Answers1

0

The docs for the --no-cache flag say:

Caching can also be disabled using the --no-cache flag. Note that this only disables reading from the cache – a .parcel-cache folder will still be created.

So my hunch is that it's working as expected. In most contexts it's totally fine to allow parcel to create a .parcel-cache folder (although it's best practice to add this folder to .gitignore). Is there something about your context that makes this a problem?

Andrew Stegmaier
  • 2,835
  • 2
  • 11
  • 23