fuse-box / fuse-box-vue-seed

Get started with Vue.js using FuseBox module loader and bundler
MIT License
74 stars 13 forks source link

Can not load pug template #11

Closed anhnhoktvn closed 5 years ago

anhnhoktvn commented 6 years ago

When I change the template attribute: lang="pug", it still use html plugin to compile the template. Step to reproduce:

  1. Open file Home.vue
  2. Add attribute lang="pug" in the template element. 3.(optional) Change the content of the template to something else (ex: div hello).
Bomberus commented 5 years ago

This issue can be closed. For everyone coming from google:

See:

  1. Download pug dependencies: yarn add consolidate pug --dev
  2. Add Pug to vue templates in fuse.js:
    VueComponentPlugin({
    [...]
    template: [ConsolidatePlugin({ useDefault : false, engine: 'pug' })]
  3. Add lang="pug" to vue file:
    <template lang="pug">
    v-app(dark)
    v-btn Hello World
    </template>
nchanged commented 5 years ago

brilliant! thanks