Open julienw opened 8 years ago
I did a simple project adapted from my bigger project here: https://github.com/julienw/wobble/tree/gobble-issue, so you can clone the repository and checkout the gobble-issue
branch.
Then you can run npm run serve
to run the gobble server, and direct your browser to http://localhost:4567. Then you can modify src/js/grid.js
to for example return something else and refresh your browser, you'll see nothing happens.
I think the issue is that in the cache object, the grid.js file id
and file
are /home/julien/perso/git/woggle/.gobble/01-babel/.cache/grid.js
, and inputdir is something like /home/julien/perso/git/woggle/.gobble/01-babel/1
(with the last number that's incrementing with rebuilds).
So in the function cacheDependency
where we replace inputdir
by @
, this doesn't work.
Now I don't know why the dep's file and id are in .cache
... Should we also try to replace the cache dir ? Do we have this directory path somewhere ?
To me, there are 4 ways to fix this:
I'd suggest to do 1 first and then decide whether to do 2 3 or 4...
I disabled the cache in https://github.com/julienw/gobble-browserify/tree/disable-cache and now it works fine for me. It's likely slower for big projects but I don't understand all this good enough to do better.
I use gobble@0.10.2 and gobble-browserify@0.6.1.
Here is my quite simple gobblefile:
When I change a dependency (even a direct dependency from the main js file) the bundle.js file is not properly updated automatically, despite gobble outputting:
I use ES6 modules transformed by babel, so maybe that could be a reason, but I don't believe so. Looking into the
.gobblz
directory I can see that Babel properly picks up my changes but not browserify.