For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/rspeedy.transformimport.md.
This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/rspeedy > TransformImport

TransformImport interface

The TransformImport option transforms the import paths to enable modular imports from subpaths of third-party packages, similar to the functionality provided by babel-plugin-import.

Signature:

export interface TransformImport 

Properties

Property

Modifiers

Type

Description

camelToDashComponentName?

boolean | undefined

(Optional) Whether to convert camelCase imports to kebab-case.

customName?

string | undefined

(Optional) Customize the transformed path.

libraryDirectory?

string | undefined

(Optional) Used to splice the transformed path, the splicing rule is ${libraryName}/${libraryDirectory}/${member}, where member is the imported member.

libraryName

string

The original import path that needs to be transformed.

transformToDefaultImport?

boolean | undefined

(Optional) Whether to convert import statements to default imports.