@talend/babel-plugin-import-d3
v0.5.0
Published
Transform import d3-xx to d3
Downloads
39
Readme
@talend/babel-plugin-import-d3
This module is a babel plugin that transform imports from d3-shape and other d3 internal plugins, into imports from d3.
Before
import { select, event } from 'd3-selection';
import { arc as foo, pie } from 'd3-shape';
import { scaleBand } from 'd3-scale';
import { csv } from 'd3-fetch'`,
After
import { select, event, arc as foo, pie, scaleBand, csv } from 'd3';`,
How to use
Installation
npm i --dev @talend/babel-plugin-import-d3
yarn add -D @talend/babel-plugin-import-d3
Configuration
// .babelrc.json
{
"plugins": ["@talend/babel-plugin-import-d3"]
}