Skip to content

Commit

Permalink
Remove jsx resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Dec 5, 2017
1 parent 630cf5a commit 5e3ef1a
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 5e3ef1a

Please sign in to comment.