Observed in benbria/loop and in a verification test: If there is a module listed in the browser field of package.json, and the file that field points to changes, and the original file is removed, the build will break with something like:
Error: ENOENT, open '/Users/calvinwiebe/dev/uber-test/foo.js'
For instance:
package.json:
browser: {'foo': './foo.js'}
Build and save cache.
Remove ./foo.js and point browser field to a different file. Such as:
browser: {'foo': './inner/foo.js'}
There will be something in the cache like this:
"deps":{"foo":"/Users/calvinwiebe/dev/uber-test/foo.js"}
And everything will die.
Removing a normal require path and file will update the cache accordingly. The solution to this might be a bit involved, as we'd need to walk up the dependency tree.
Observed in
benbria/loopand in a verification test: If there is a module listed in thebrowserfield ofpackage.json, and the file that field points to changes, and the original file is removed, the build will break with something like:For instance:
package.json:Build and save cache.
Remove
./foo.jsand point browser field to a different file. Such as:There will be something in the cache like this:
And everything will die.
Removing a normal require path and file will update the cache accordingly. The solution to this might be a bit involved, as we'd need to walk up the dependency tree.