Build fails if doing destructuring assignment outside of the define function of entrypoints #1485
Open
5 tasks done
Labels
pending-triage
Someone (usually a maintainer) needs to look into this to see if it's a bug
Describe the bug
In the entrypoints, if a destructuring assignment is performed outside of the define function and references that variable, the build fails.
Reproduction
For example, the code that fails in
entrypoints/background.ts
is as follows:The build failure message is as follows:
However, if the variable reference is within a define function, it succeeds.
Or, if no destructuring assignment is done, it will succeed.
In the success example, it can be seen that the value is output to the console.
Steps to reproduce
This can be seen immediately on the demo project created by
npx wxt@latest init
.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: