We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently all root entries in the serialized virtual module are immutable, even if they were mutable on the original code.
Example:
let count = 0; inlineMod({ constExport: { increment() { count++; }, decrement() { count++; }, }, });
In this case the count won't change across invocations because it is included immutably into the virtual module.
count
The workaround for this is to have the mutable property inside of an object. This works:
const state = { count: 0 }; inlineMod({ constExport: { increment() { state.count++; }, decrement() { state.count++; }, }, });
Maybe the first case could work out-of-the-box.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently all root entries in the serialized virtual module are immutable, even if they were mutable on the original code.
Example:
In this case the
count
won't change across invocations because it is included immutably into the virtual module.The workaround for this is to have the mutable property inside of an object. This works:
Maybe the first case could work out-of-the-box.
The text was updated successfully, but these errors were encountered: