Vue CLI 3 plugin to add pug templating to your components and compilation of .pug template files
npm install vue-cli-plugin-pug
Vue CLI 3 plugin to add pug templating to your components and compilation of .pug template files
vue ui interface, or run the following in your Vue-cli 3 project: sh
vue add pug
`
You can now start using pug templates in your components:
`html
div
h1 Hello World!
`The plugin will also convert
.pug files to html, so you can add entries to vue.config.js and get a (build) output file of ./dist/public/index.html:`js
module.exports = {
pages: {
index: {
entry: './src/main.js',
template: './src/index.pug'
}
}
}
``