core3-utils

@wixc3/fs-utils on Github

Home > @wixc3/fs-utils > getBareImportSpecifier

getBareImportSpecifier() function

Creates bare import specifier for an absolute import path, stripping extension from JS/TS files.

Signature:

export declare function getBareImportSpecifier(absoluteImportPath: string, packageJsonPath: string, packageJsonName: string): string;

Parameters

Parameter Type Description
absoluteImportPath string an absolute import path
packageJsonPath string package.json file path
packageJsonName string package name

Returns:

string