TypeError: Cannot redefine property: default
vaynevayne opened this issue Β· comments
π Bug Report
A clear and concise description of what the bug is.
If your bug report involves classes, check the docs on how classes are handled first. For patches, don't file issues if they are not optimal, only if they are incorrect.
Link to repro
A bug report without a reproduction is not a bug report. Failing to follow this templately is likely to result in an immediate close & lock of the issue.
Please provide either a CodeSandbox demo, or a PR with a unit test. In limited cases, a minimal repository on GitHub is accepted as well.
To Reproduce
Steps to reproduce the behavior:
Observed behavior
A description of what behavior you observed and why you consider it faulty.
Expected behavior
A clear and concise description of what you expected to happen instead.
Environment
We only accept bug reports against the latest Immer version.
- Immer version:
- Occurs with
setUseProxies(true)
- I filed this report against the latest version of Immer
- Occurs with
setUseProxies(false)
(ES5 only)
10.0.3
dev is ok
prod is error
![image](https://private-user-images.githubusercontent.com/124666577/279958869-5c3fc83c-eb87-456c-b4df-968cc69a5a87.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcwNzE3OTMsIm5iZiI6MTcxNzA3MTQ5MywicGF0aCI6Ii8xMjQ2NjY1NzcvMjc5OTU4ODY5LTVjM2ZjODNjLWViODctNDU2Yy1iNGRmLTk2OGNjNjlhNWE4Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNTMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDUzMFQxMjE4MTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOGIyZmVjMDQ1ZjliODg4YWQwMGQ5ZjE0ZmJmNzJlZjVlYWE5ZDc2ZGFjYWJlMTFjNDM2MGRkNTU2Yzk5NDhhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wEFLWQI2_lYZ9rrpdPPsRLkmr9THuGPEConuK4TZHSI)
9.x and 10.x also exist this issue
Please follow the issue template and create a minimal reproduction. Without a screenshot is completely inactionable.