2.5.1
webpack.base.config
has the following alias
'vue$': 'vue/dist/vue.common.js',
Running vue 2.5.1
, inside a component do
export default {
delimiters: ['{', '}'],
And inside the <template>
tags i have
<div>
<a class="logo">{ Model.Name }</a>
</div>
Should output models value
outputting { Model.Name }
Delimiters can only be changed when using runtime compilation with the full build (vue.js
). It does not work in *.vue
files (to keep all *.vue
files syntax consistent)
Also, there's no version 2.5.1 yet ;)
Oh okay! thanks! haha yeah i realized the 2.5.1
was for the cli :upside_down_face:
Also thanks for all your great work, i love vue!
[[ Thanks ]]
This is interesting to me. If you cannot change them in the .vue
files you have inconsistency with applications that are harder to change. In Craft 3.0 I cannot see how to change the lexers globally. Even if I could find this it would likely break any Craft plugins that expect them to be the Twig default.
I think the same argument could be made for the other applications, there may be reasons there not to change the Lexers. I think allowing .vue
components to change their own delimiters would make sense, however, I do agree with the argument that they should not be changed globally for a Vue application for the same reason. IMHO the best way to do it is to allow the developer to choose when to change them, even on a component that is in a .vue
file.
Most helpful comment
This is interesting to me. If you cannot change them in the
.vue
files you have inconsistency with applications that are harder to change. In Craft 3.0 I cannot see how to change the lexers globally. Even if I could find this it would likely break any Craft plugins that expect them to be the Twig default.I think the same argument could be made for the other applications, there may be reasons there not to change the Lexers. I think allowing
.vue
components to change their own delimiters would make sense, however, I do agree with the argument that they should not be changed globally for a Vue application for the same reason. IMHO the best way to do it is to allow the developer to choose when to change them, even on a component that is in a.vue
file.