babel-plugin-axiom
v1.1.0
Published
Babel Plugin for modular Axiom builds
Downloads
6
Readme
babel-plugin-axiom
This plugin is a transform to remove unused Axiom dependencies without the need to target the relative paths of exports.
See also
Example
// Input
import {
shortDate,
Base,
DotPlotChart as DotPlotChartAxiom,
} from 'bw-axiom';
// Output
import shortDate from 'bw-axiom/lib/materials/date-and-time/shortDate';
import Base from 'bw-axiom/lib/components/base/Base';
import DotPlotChartAxiom from 'bw-axiom/lib/charts/dot-plot/DotPlotChart';
Limitations: You must be using ES6 imports (both specifiers and default work) to load axiom.
Usage
Via .babelrc
(Recommended)
{
"plugins": ["axiom"]
}
Via CLI
$ babel --plugins axiom script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["axiom"]
});