https://github.com/tmpfs/spack-tree-shaking
MVP for possible tree shaking bug
https://github.com/tmpfs/spack-tree-shaking
Last synced: 3 months ago
JSON representation
MVP for possible tree shaking bug
- Host: GitHub
- URL: https://github.com/tmpfs/spack-tree-shaking
- Owner: tmpfs
- Created: 2021-08-21T05:09:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-25T00:44:35.000Z (over 4 years ago)
- Last Synced: 2025-01-05T02:12:16.178Z (12 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tree Shaking Bug?
This repo reproduces an issue observed when compiling a much larger project with `spack`.
To build run `yarn install` and `npx spack`.
The compiled bundle does not include the code for the `memoize` function which is imported in `src/util.js`, see the output in `dist/main.js`.
This in turn leads to a `ReferenceError` at runtime:
```
Uncaught ReferenceError: memoize is not defined
```
I suspect this is a bug in the tree shaking algorithm.