KaiHotz / react-rollup-boilerplate

Boilerplate for creating React component libraries, bundled with Rollup.js to ESM and/or CJS Modules, Storybook, Typescript

Home Page:https://kaihotz.github.io/react-rollup-boilerplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does the build 'tree-shake' the components?

jeremytenjo opened this issue · comments

Does the build 'tree-shake' the components?

commented

@tenjojeremy I am guessing you are consuming this library in an application that's using webpack? If so, then webpack should be able to tree shake this library as it has es6 modules output. The important thing is that this library outputting es6 modules, and it's the job of your consuming application's bundler (e.g. webpack) to 'tree shake'.