#346·React95

build: enable preserveModules to main bundle so consumers can use tree shaking

Author: WesSouzaCreated Aug 5, 2022Updated Nov 28, 2022
Labelsenhancementreleased on @betareleased

Rollup is not configure to preserveModules for the src/index.ts entry, resulting in one ESM and one JS file for the entire library.

We'd like to allow consumers to import individual components and be able to tree shake the files that are not used.

javascript
import { Button } from 'react95';

Should only include files necessary for the Button to render.