Shaker deletes referenced export #94
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: webpack 📦
Issue is related to webpack bundler
cat: monorepo 🔱
Issues related to usage of wyw-in-js in monorepo
needs: complete repro 🖥️
Issue need to have complete repro provided
Environment
Description
See the attached codesandbox link for code layout.
index.js
importsSpring
fromdep.js
. Shaker deletes thefallback
export indep.js
even though it's referenced bySpring
:This results in a ReferenceError when evaluating the module since fallback is an undeclared variable.
The problem goes away if I either:
fallback
fallback
to something elsefallback
Reproducible Demo
https://codesandbox.io/p/devbox/87ryf9
Run
DEBUG='wyw-in-js:*' node_modules/.bin/webpack
in the terminal.The text was updated successfully, but these errors were encountered: