1.2.1 • Published 11 months ago

@hrc/babel-config v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@hrc/babel-config

Create a Babel config for component packages of <hrc /> to reduce bundle size.

!NOTE If your project supports Vite, you can use vite-plugin-hrc-import instead.

Installation

npm install -D @hrc/babel-config babel-plugin-import

Usage

In your .babelrc.js file:

import hrcConfig from "@hrc/babel-config";

// single package
const plugins = [
  ...otherPlugins,
  ...hrcConfig("input")
];

// multiple packages
const plugins = [
  ...otherPlugins,
  ...hrcConfig(["button", "input"])
];

// all supported packages
const plugins = [
  ...otherPlugins,
  ...hrcConfig("all")
];

module.exports = { plugins };

Documentation

1.2.0

12 months ago

1.2.1

11 months ago

1.1.0

1 year ago

1.0.0

1 year ago