@talend/babel-plugin-import-from-index
v1.8.0
Published
Transform default imports from specific path to named import from index
Downloads
2,136
Readme
plugin-import-from-index
This module is a babel plugin that transform default imports from specific file, into named imports from index.
Before
import React from 'react';
import { SidePanel } from '@talend/react-components';
import Actions, { ActionButton, ActionDropdown } from '@talend/react-components/lib/actions';
import List from '@talend/react-components/lib/List';
After
import React from 'react';
import { SidePanel, Actions, ActionButton, ActionDropdown, List } from '@talend/react-components';
How to use
Installation
npm i --dev @talend/babel-plugin-import-from-index
yarn add -D @talend/babel-plugin-import-from-index
Configuration
// .babelrc.json
{
"plugins": ["@talend/babel-plugin-import-from-index"]
}