Skip to content

Commit

Permalink
fix: still resolve jsnext fields
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 21, 2021
1 parent 2a17967 commit 4e0cd73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -25,7 +25,12 @@ import isBuiltin from 'isbuiltin'
import { isCSSRequest } from './css'
import { resolve as _resolveExports } from 'resolve.exports'

const mainFields = ['module', 'main']
const mainFields = [
'module',
'jsnext:main', // moment still uses this...
'jsnext',
'main'
]

function resolveExports(
pkg: PackageData['data'],
Expand Down

0 comments on commit 4e0cd73

Please sign in to comment.