Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adi518/react-popper-tooltip-treeshake-reproduction
https://github.com/adi518/react-popper-tooltip-treeshake-reproduction
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/adi518/react-popper-tooltip-treeshake-reproduction
- Owner: adi518
- Created: 2020-07-18T21:47:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T01:53:23.000Z (over 1 year ago)
- Last Synced: 2024-10-28T09:21:45.701Z (about 2 months ago)
- Language: TypeScript
- Size: 2.51 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository was setup to reproduce a tree-shaking issue with `react-popper-tooltip`. See: https://github.com/mohsinulhaq/react-popper-tooltip/issues/97
## How To Reproduce
1. Hit `yarn` to bootstrap the workspace.
2. Change directory to `ui-components` and hit `yarn build:rollup`.
3. Change directory to `my-app`, hit `yarn build` and then `yarn build:analyze`.
4. In the analyzer window, select `build/static/js/main.*.chunk.js` file and you should see just the Button component code.
5. Go to `ui-components/src/index.ts` and _**uncomment**_ `PopperTooltip`. Repeat steps 1-4, you should now see `react-popper-tooltip` code despite being unused by the application. You can also run `yarn check-treeshake` under `ui-components` to check whether tree-shaking was successful. However, with `react-popper-tooltip` it seems to fail fatally, so no real output. I suggest inspecting the output of `ui-components/dist/esm/index.js`.