Skip to content

Commit

Permalink
fix(type): update ExportsData type
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored and patak-dev committed Oct 4, 2021
1 parent 61dd3ed commit b582581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import {
normalizeId
} from '../utils'
import { esbuildDepPlugin } from './esbuildDepPlugin'
import { ImportSpecifier, init, parse } from 'es-module-lexer'
import { init, parse } from 'es-module-lexer'
import { scanImports } from './scan'
import { transformWithEsbuild } from '../plugins/esbuild'
import { performance } from 'perf_hooks'

const debug = createDebugger('vite:deps')

export type ExportsData = [ImportSpecifier[], string[]] & {
export type ExportsData = ReturnType<typeof parse> & {
// es-module-lexer has a facade detection but isn't always accurate for our
// use case when the module has default export
hasReExports?: true
Expand Down Expand Up @@ -379,7 +379,7 @@ function needsInterop(
return false
}

function isSingleDefaultExport(exports: string[]) {
function isSingleDefaultExport(exports: readonly string[]) {
return exports.length === 1 && exports[0] === 'default'
}

Expand Down

0 comments on commit b582581

Please sign in to comment.