File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ function rewrite (attr, name) {
47
47
48
48
module . exports = function ( html ) {
49
49
this . cacheable ( )
50
+ var isProduction = this . minimize || process . env . NODE_ENV === 'production'
50
51
var query = loaderUtils . parseQuery ( this . query )
51
52
var isServer = this . options . target === 'node'
52
53
var vueOptions = this . options . __vueOptions__
@@ -68,10 +69,19 @@ module.exports = function (html) {
68
69
} )
69
70
code = 'module.exports={render:function(){},staticRenderFns:[]}'
70
71
} else {
72
+ var bubleOptions = vueOptions . buble
71
73
code = transpile ( 'module.exports={' +
72
74
'render:' + toFunction ( compiled . render ) + ',' +
73
75
'staticRenderFns: [' + compiled . staticRenderFns . map ( toFunction ) . join ( ',' ) + ']' +
74
- '}' , vueOptions . buble )
76
+ '}' , bubleOptions )
77
+ // mark with stripped (this enables Vue to use correct runtime proxy detection)
78
+ if ( ! isProduction && (
79
+ ! bubleOptions ||
80
+ ! bubleOptions . transforms ||
81
+ bubleOptions . transforms . stripWith !== false
82
+ ) ) {
83
+ code += `\nmodule.exports.render._withStripped = true`
84
+ }
75
85
}
76
86
// hot-reload
77
87
if ( ! isServer &&
You can’t perform that action at this time.
0 commit comments