Make Browserify respect package.json
bclinkinbeard opened this issue · comments
When running tests in the browser with node test.js -b
, Browserify does not appear to utilize package.json config for things like browserify-shim. If I take the same file and do browserify test.js > bundle.js
and then run bundle.js in the browser things work as expected.
FWIW, looking at the code I don't see what would be causing it to ignore package.json now.
OK, upon further inspection this actually does work. What was throwing me is that when you start the server you get { [Error: Cannot find module 'angular'] code: 'MODULE_NOT_FOUND' }
in the console (I am shimming angular). The code does run successfully in the browser though.
Might be worth adding a note to the README or even the startup output that ignoring errors about shimmed modules is OK.