Open goodpixels opened 6 years ago
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
pug --obj package.json template.pug --out public
But I don't know how to pass package.json to Vueify.
package.json
I tried using vue.config.js and adding a data object to it, but to no avail.
vue.config.js
data
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
I am trying to use static variables in my Pug templates, like so:
template.pug
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 adata
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