Open
Description
Version
15.9.6
Reproduction link
https://github.com/zhouxinyong/vue2-build-issue
Steps to reproduce
- yarn
- add
v-if="list.inclues(4)"
in template at file:App.vue
- yarn build
- check the build file chunk-vendors.js
What is expected?
auto import polyfill with Array.prototype.includes
What is actually happening?
no polyfill with Array.prototype.includes
when i change v-if="list.inclues(4)"
to v-if="checkKey(4)"
, and add a method like below
methods: {
checkKey (key) {
return this.list.includes(key)
}
}
then run yarn build, check the build file chunk-vendors.js, there has auto import polyfill with Array.prototype.includes