Skip to content

Commit e73fb5b

Browse files
authored
fix: transform uses placeholderPattern: false (#163)
We explicitly disable placeholderPatterns to prevent compilation errors of valid Vue.js templates using Babel 7 transform. babel/babel#8067
1 parent f77774d commit e73fb5b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/fixtures/FooComponent.vue

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div id="app">
33
<div class="lorem-class">some test text</div>
4+
<div class="some-class">NOTAPLACEHOLDER</div>
45
<button v-on:click="clickHandler('value passed to clickHandler')">Click Me!</button>
56
</div>
67
</template>

transforms/transformBabel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function appendRenderPlugin(render, staticRenderFns) {
1818
);
1919
__vue__options__.render = ${render};
2020
__vue__options__.staticRenderFns = ${staticRenderFns};
21-
`);
21+
`, {placeholderPattern: false});
2222

2323
return () => {
2424
if (!render || !staticRenderFns) {

0 commit comments

Comments
 (0)