Minimizing bundle size
The following packages exports multiple components:
The default entry point for the previous packages includes CSS for all of its component. You have two options to reduce the bundle size:
Option 1: Use path imports
Option 2: Use vite-plugin-hrc-import
-
Install
vite-plugin-hrc-import
: -
Write the following code in your
vite.config.js
file:
Option 3: Use @hrc/babel-config
-
Setup
babel
in your project. -
Install
@hrc/babel-config
andbabel-plugin-import
: -
Create a
.babelrc.js
in the root directory of your project and write the following: