rollup-plugin-vue2
rollup-plugin-vue2 copied to clipboard
Mark transpiled render function with `_withStripped = true`
This is an internal flag that allows Vue's runtime to pick the correct Proxy strategy to detect variable reference errors during render, depending on whether with
has been stripped by vue-template-es2015-compiler
.
The same is done in vue-loader
: https://github.com/vuejs/vue-loader/blob/master/lib/template-compiler.js#L83
A bit hacky, but luckily that there are not many tools that actually need to be aware of this flag.
Great work on this plugin, btw!
I don't know how to implement this without a radically different approach. What can go wrong if this flag is missing?