resolve_specifier.ts

Declarations
#

2 declarations

view source

resolve_specifier
#

resolve_specifier.ts view source

(specifier: string, dir: string): Promise<ResolvedSpecifier>

Maps an import specifier relative to dir, and infer the correct extension following Vite conventions. If no .js file is found for the specifier on the filesystem, it assumes .ts.

specifier

type string

dir

type string

returns

Promise<ResolvedSpecifier>

ResolvedSpecifier
#

resolve_specifier.ts view source

ResolvedSpecifier

path_id

The resolved filesystem path for the specifier.

type PathId

path_id_with_querystring

Same as path_id but includes ?raw and other querystrings. (currently none)

type string

specifier

type string

mapped_specifier

type string

namespace

type undefined | 'sveltekit_local_imports_ts' | 'sveltekit_local_imports_js'

raw

type boolean

Depends on
#

Imported by
#