webpack/enhanced-resolve — pull request #9 by hmalphettes (2014-08-12 07:17:03+00:00)
Title: Display invalid package.json errors

I had an invalid package.json and webpack would report:
```
➜ stoic.mdcache git:(vitamin-a-squashed) ✗ webpack --display-error-details --display-reasons
Hash: 78fce45e15981a9aa20c
Version: webpack 1.3.3-beta1
Time: 28ms
Asset Size Chunks Chunk Names
dist/stoic.mdcache.js 1647 0 [emitted] stoic.mdcache
[0] multi stoic.mdcache 28 {0} [built] [1 error]

ERROR in multi stoic.mdcache
Module not found: Error: Cannot resolve 'file' or 'directory' ./index-browser in /Users/hugues/proj/stoic-umbrella/stoic.mdcache
resolve directory
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser doesn't exist (directory default file)
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser/package.json doesn't exist (directory description file)
resolve file
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser doesn't exist
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser.webpack.js doesn't exist
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser.web.js doesn't exist
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser.json doesn't exist
resolve result /Users/hugues/proj/stoic-umbrella/stoic.mdcache/index-browser.js
```
It turns out that my package.json was wrong.
With this PR it will display one extra line:
```
/Users/hugues/proj/stoic-umbrella/stoic.mdcache/package.json (directory description file): SyntaxError: Unexpected string
```
Not sure if this is right way to improve this.
And thanks for a fantastic tool.