This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ export default function vue(options = {}) {
123
123
const map = new MagicString ( source ) ;
124
124
125
125
return {
126
- code : source . replace ( / i f [ \s ] * \( ' _ _ V U E _ W I T H _ S T A T E M E N T _ _ ' \) / g, 'with(this)' ) ,
126
+ code : source . replace ( / i f [ \s ] * \( w i n d o w \. _ _ V U E _ W I T H _ S T A T E M E N T _ _ \) / g, 'with(this)' ) ,
127
127
map : map . generateMap ( { hires : true } ) ,
128
128
} ;
129
129
} ,
130
130
ongenerate ( opts , rendered ) {
131
131
generateStyleBundle ( ) ;
132
132
rendered . code = rendered . code . replace (
133
- / i f [ \s ] * \( ' _ _ V U E _ W I T H _ S T A T E M E N T _ _ ' \) / g, 'with(this)' ) ;
133
+ / i f [ \s ] * \( w i n d o w \. _ _ V U E _ W I T H _ S T A T E M E N T _ _ \) / g, 'with(this)' ) ;
134
134
} ,
135
135
} ;
136
136
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function padContent(content) {
47
47
function wrapRenderFunction ( code ) {
48
48
// Replace with(this) by something that works on strict mode
49
49
// https://github.com/vuejs/vue-template-es2015-compiler/blob/master/index.js
50
- code = code . replace ( / w i t h \( t h i s \) / g, "if(' __VUE_WITH_STATEMENT__' )" ) ;
50
+ code = code . replace ( / w i t h \( t h i s \) / g, "if(window. __VUE_WITH_STATEMENT__)" ) ;
51
51
return `function(){${ code } }` ;
52
52
}
53
53
You can’t perform that action at this time.
0 commit comments