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

PropertyModifiersTypeDescription
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.
libraryNamestringThe original import path that needs to be transformed.
transformToDefaultImport?boolean | undefined(Optional) Whether to convert import statements to default imports.
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.