Pug data not working in templates: how to define static data for Pug?
goodpixels opened this issue · 0 comments
goodpixels commented
I am trying to use static variables in my Pug templates, like so:
template.pug
h6 Currently running version #{version}
This works perfectly fine from the CLI:
pug --obj package.json template.pug --out public
But I don't know how to pass package.json to Vueify.
I tried using vue.config.js and adding a data object to it, but to no avail.
How can I achieve this? Thank you!
UPDATE:
Looking at source code for compiler.js, it seems that there is no data passed to the templates.
I found this, but it's not really helpful: https://forum.vuejs.org/t/pug-template-data-binding-in-vue-component/7437/2