# @talend/plugin-transform-ui-imports

> This plugin transform import of component using /lib path

Latest version **0.0.0** (published 2020-01-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @talend/plugin-transform-ui-imports
pnpm add @talend/plugin-transform-ui-imports
yarn add @talend/plugin-transform-ui-imports
bun add @talend/plugin-transform-ui-imports
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2020-01-08 |
| First published | 2020-01-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Talend Frontend |
| Maintainers | talend-frontend, talend-frontend-ro |

## Links

- npm: https://www.npmjs.com/package/@talend/plugin-transform-ui-imports
- npm.io page: https://npm.io/package/@talend/plugin-transform-ui-imports

## Dependencies (1)

- [@babel/types](https://npm.io/package/@babel/types.md) ^7.3.4

## Recent versions

- 0.0.0 (latest) — 2020-01-08

## README

# @talend/plugin-transform-ui-imports

This package is a babel plugin ready to be used with @talend/react-components and @talend/react-containers

The object is to minimize bundle size by picking only the needed component.

How to use:

    npm i --save-dev @talend/plugin-transform-ui-imports
    // or
    yarn add -D @talend/plugin-transform-ui-imports

Then update your `.babelrc` file:
```diff
"plugins": [
+    "module:@talend/plugin-transform-ui-imports",
    ...
]
```

# QA

## Q1: I don t see any changes to my bundle size

OK, with version < 4.23 there are basic components which drain all components.
Fix: https://github.com/Talend/ui/pull/2610 included in 4.23.0 version (f14d41ae4d13b54720994244a17b1bcc0acbaf62)

## My App doesn't work once the plugin is activated

You may have a resolution to undefined in some corner case not already handled by the plugin.

The plugin first try to detect corner case. The last operation is a simple shift of import to `/lib`

So please give the corresponding corner case so we can do a fix.

## Is there an alternative ?

Yes you can also use a codemode which is provided in https://github.com/Talend/ui/pull/2607 so your code base is updated using same technics and so you can do the fix yourself because it s your code.

---
_Source: https://npm.io/package/@talend/plugin-transform-ui-imports · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
