Skip to content

Commit

Permalink
fix: transform uses placeholderPattern: false (#163)
Browse files Browse the repository at this point in the history
We explicitly disable placeholderPatterns to prevent compilation errors
of valid Vue.js templates using Babel 7 transform.
babel/babel#8067
  • Loading branch information
jeremyjh committed Feb 9, 2020
1 parent f77774d commit e73fb5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/fixtures/FooComponent.vue
@@ -1,6 +1,7 @@
<template>
<div id="app">
<div class="lorem-class">some test text</div>
<div class="some-class">NOTAPLACEHOLDER</div>
<button v-on:click="clickHandler('value passed to clickHandler')">Click Me!</button>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion transforms/transformBabel.js
Expand Up @@ -18,7 +18,7 @@ function appendRenderPlugin(render, staticRenderFns) {
);
__vue__options__.render = ${render};
__vue__options__.staticRenderFns = ${staticRenderFns};
`);
`, {placeholderPattern: false});

return () => {
if (!render || !staticRenderFns) {
Expand Down

0 comments on commit e73fb5b

Please sign in to comment.