v-bind:class={'box-default': isDefault} giving error
kurienzach opened this issue · comments
Kurien Zacharia commented
Binding a class attribute in the template like
v-bind:class={'box-default': isDefault}
produces error
- avoid using JavaScript keyword as property name: "default" in expression :class="{'box-default': isDefault}"
Kurien Zacharia commented
Changing the following line in index.js:155 fixed the issue for me
https://github.com/pandao/gulp-vue-module/blob/master/index.js#L155
contents.template = contents.template.join("").toString().replace(/'/g, "'");
to
contents.template = contents.template.join("").toString().replace(/'/g, "\\'");