Closed xachary closed 2 years ago
It is a bug.
Currently Babel will transform [...document.querySelectorAll('div')]
into:
function _toConsumableArray(arr) {
// ...
}
_toConsumableArray(document.querySelectorAll("div"));
But this compiler will drop _toConsumableArray
directly, So your error occured.
May be we can fix it by add "arrayLikeIsIterable": true
to assumptions
, according to babel-plugin-transform-spread Doc.
Try to reproduce this error. Setup DEMO Project can help.
Follow CONTRIBUTING.md to make a Pull Request.
We just publish a beta version 1.0.7-beta.0
which will fix the error _toConsumableArray is not defined.
yarn add vue-template-babel-compiler@beta
.Thanks for your feedback again!
We just publish a beta version
1.0.7-beta.0
which will fix the error_toConsumableArray is not defined.
You can try it by
yarn add vue-template-babel-compiler@beta
.
1.0.7-beta.0
did't fix this error, I will look into this deeply.
We just publish v1.1.2
, it will fix this issue,
Try it by:
npm install vue-template-babel-compiler@latest
// or
yarn add vue-template-babel-compiler@latest
Thanks for your feedback again!
Current behavior
ReferenceError: _toConsumableArray is not defined.
Expected behavior
No ReferenceError.
Usage