Fix ?module bug with empty filenames
This commit is contained in:
parent
e95dcf0028
commit
50979bfca5
|
@ -82,7 +82,7 @@ function fetchFile(req, res, next) {
|
|||
if (req.query.module != null) {
|
||||
// They want an ES module. Try "module", "jsnext:main", and "/"
|
||||
// https://github.com/rollup/rollup/wiki/pkg.module
|
||||
if (filename == null)
|
||||
if (!filename)
|
||||
filename = req.packageConfig.module || req.packageConfig['jsnext:main'] || '/'
|
||||
} else if (filename) {
|
||||
// They are requesting an explicit filename. Only try to find an
|
||||
|
|
Loading…
Reference in New Issue