tsdx
tsdx copied to clipboard
Example project doesnt update when changes are made to stuff in src
Current Behavior
When i make any changes to anything in the src folder (having run tsdx watch) nothing is picked up in the example project which is running.
Expected behavior
That when i make a change to my component, its reflected in the example project, live
Your environment
npx envinfo --system OS --browsers --binaries --npmPackages tsdx,typescript --npmGlobalPackages tsdx,typescript
The above command doesnt work for me:
$ npx envinfo --system OS --browsers --binaries --npmPackages tsdx,typescript --npmGlobalPackages tsdx,typescript
'"C:\Users\richa\AppData\Local\Yarn\bin\\..\Data\global\node_modules\.bin\envinfo.cmd"' is not recognized as an internal or external command,
operable program or batch file.
If you are on Parcel V2 by any chances, then there's Parcel cache which needs to be configured properly. By default it serves cached version of your lib/app created on first run
If you are on Parcel V2 by any chances, then there's Parcel cache which needs to be configured properly. By default it serves cached version of your lib/app created on first run
Could you serve any examples how to disable parcel v2 cache when using tsdx?
Check it out: https://parceljs.org/cli.html#disable-the-filesystem-cache
I had the same problem. It looks like this is a limitation of Parcel 2, see their issue #4332. Until they address the issue, you have to find a workaround.
I have no experience with parcel, nor with node or bash scripts, so the solution I am currently using is probably of poor quality, nevertheless I am sharing it, just in case it helps someone:
- Add this
"prestart": "rm -r .parcel-cache",
script to the package.json of the example folder - Restart parcel anytime you need the example to pick up changes made in src (
^C
and thennpm start
)