Use / instead of "index"

This commit is contained in:
MICHAEL JACKSON 2017-08-22 20:16:21 -07:00
parent f64bb6bfd5
commit 6329a83f67
1 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,9 @@ const createPackageURL = require('../utils/createPackageURL')
const getPackage = require('./utils/getPackage')
const getPackageInfo = require('./utils/getPackageInfo')
/**
* File extensions to look for when automatically resolving.
*/
const FindExtensions = [ '', '.js', '.json' ]
/**
@ -109,8 +112,8 @@ function fetchFile(req, res, next) {
// Fall back to the "browser" field if declared (only support strings).
mainFilename = packageConfig.browser
} else {
// If there is no main, use "index" (same as npm).
mainFilename = packageConfig.main || 'index'
// If there is no main, use "/" (same as npm).
mainFilename = packageConfig.main || '/'
}
}