Skip to content

Commit

Permalink
Revert "Revert "Remove jsx resolver""
Browse files Browse the repository at this point in the history
This reverts commit 8248e50.
  • Loading branch information
timneutkens committed Dec 5, 2017
1 parent 8248e50 commit 2a6d418
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,18 @@ function getPaths (id) {
const i = sep === '/' ? id : id.replace(/\//g, sep)

if (i.slice(-3) === '.js') return [i]
if (i.slice(-4) === '.jsx') return [i]
if (i.slice(-5) === '.json') return [i]

if (i[i.length - 1] === sep) {
return [
i + 'index.js',
i + 'index.jsx',
i + 'index.json'
]
}

return [
i + '.js',
join(i, 'index.js'),
i + '.jsx',
join(i, 'index.jsx'),
i + '.json',
join(i, 'index.json')
]
Expand Down

0 comments on commit 2a6d418

Please sign in to comment.