Home > @lynx-js/rspeedy > TransformImport
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:
| 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. |