Skip to content

Commit

Permalink
refactor: improve bare import regex
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 21, 2021
1 parent 259d6be commit 2a17967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import slash from 'slash'
import { FS_PREFIX, SUPPORTED_EXTS } from './constants'
import resolve from 'resolve'

export const bareImportRE = /^[\w@]/
export const bareImportRE = /^[\w@](?!.*:\/\/)/
export const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//

let isRunningWithYarnPnp: boolean
Expand Down

0 comments on commit 2a17967

Please sign in to comment.