https://github.com/apidcloud/tree-shaking-webpack
A minimum repro for webpack's tree shaking (not working for now)
https://github.com/apidcloud/tree-shaking-webpack
Last synced: about 1 year ago
JSON representation
A minimum repro for webpack's tree shaking (not working for now)
- Host: GitHub
- URL: https://github.com/apidcloud/tree-shaking-webpack
- Owner: Apidcloud
- Created: 2019-03-24T01:03:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T06:20:51.000Z (about 7 years ago)
- Last Synced: 2025-02-01T16:48:41.931Z (over 1 year ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tree-shaking-webpack
A minimum repro for webpack's tree shaking (**not working for now**)
## Goal
Bundle every file from each package (`/src` and `/another-package/src`) in their own bundle (`core` and `consumer` respectively).
`another-package` only uses one of the functions (`cube`), so its bundle (`consumer`) **should not** have the other functions exported by `core` (i.e., the bundle from the files from `/src`).
## Issue
Despite `another-package` not consuming any other function (other than `cube`), its bundle `consumer` is still showing `someUnusedFn` that is exported by `core`.
Similar issues:
- https://stackoverflow.com/questions/47663486/webpack-3-babel-and-tree-shaking-not-working?rq=1
- https://stackoverflow.com/questions/48599352/webpack-including-unused-exports-in-final-bundle-not-tree-shaking