@hrc/babel-config
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@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

Package Sidebar

Install

npm i @hrc/babel-config

Weekly Downloads

5

Version

1.2.1

License

MIT

Unpacked Size

6.78 kB

Total Files

11

Last publish

Collaborators

  • hdoc