tui.grid icon indicating copy to clipboard operation
tui.grid copied to clipboard

Make xlsx an optional dependency

Open quentincaffeino opened this issue 2 years ago • 2 comments

Current Behavior

Bundle size increased almost 4 times when xlsx was added. Not all projects require this functionality. Before: https://bundlephobia.com/package/[email protected] (108.5 kB) After: https://bundlephobia.com/package/[email protected] (428.9 kB)

PR that added this functionality: https://github.com/nhn/tui.grid/pull/1465

Expected Behavior

It would be nice to have this as an optional feature.

quentincaffeino avatar Oct 16 '21 16:10 quentincaffeino

@quentincaffeino Sorry for late replying. xlsx is set as an external dependency so there is no change to the actual bundle size as shown in the image below. Bundlephobia seems to include all of these external dependencies as well to determine the size of the bundle. I will check further, and if you have any other comments, please leave a comment.

jajugoguma avatar Nov 01 '21 05:11 jajugoguma

@jajugoguma, I guess bundlephobia has this issue because it is included as a dependency in package.json. Shouldn't xlsx be listed as a peerDependency?

quentincaffeino avatar Nov 01 '21 09:11 quentincaffeino