Hi,
Apparently some npm packages (e.g. asap) specify an object in package.json's browser field (see https://github.com/defunctzombie/package-browser-field-spec). This causes small to fail in the Resolve.resolveDirectory function as path.join throws
TypeError: Path must be a string. Received { './asap': './browser-asap.js',
'./asap.js': './browser-asap.js',
'./raw': './browser-raw.js',
'./raw.js': './browser-raw.js',
'./test/domain.js': './test/browser-domain.js' }
at assertPath (path.js:7:11)
at Object.join (path.js:468:7)
...
Maybe emit a warning and fall back to the main field in these cases, and/or allow selecting the preferred main file (e.g. main or browser)? Or implement the extended browser field spec.