this
is transpiled incorrectly in a class instance field
#7676
Labels
bug: upstream
Bug in a dependency of Vite
feat: commonjs
@rollup/plugin-commonjs issue
inconsistency
Inconsistency between dev & build
Describe the bug
I have a library, which is transpiled (by Vite) to something like this
Note the
currentState
property.When this library is loaded into a Vite app, and built (ie npm run build),
currentState
is transformed incorrectly, whererunMutation: this.runMutation
becomesThe Vite.new link below reproduces this all in full (after running
npm run build
)Reproduction
https://stackblitz.com/edit/vitejs-vite-f18nb2?file=vite.config.js&terminal=dev
System Info
Repro is the same on my machine vs the sandbox link above, but for whatever it's worth, mine is
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: