rollup-plugin-vue2 icon indicating copy to clipboard operation
rollup-plugin-vue2 copied to clipboard

Mark transpiled render function with `_withStripped = true`

Open yyx990803 opened this issue 8 years ago • 1 comments

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!

yyx990803 avatar Dec 12 '16 18:12 yyx990803

I don't know how to implement this without a radically different approach. What can go wrong if this flag is missing?

thgh avatar Jan 18 '17 22:01 thgh