Components configuration

Control where your Components live and how you reference them.

root

You may define the path where your Components are located:

config.js
module.exports = {
  build: {
    components: {
      root: 'src/components'
    }
  }
}

This will allow you to reference components like so:

src/templates/example.html
<component src="example.html"></component>

tags

Additionally, you may also customize the tag and attribute:

config.js
module.exports = {
  build: {
    components: {
      tag: 'module',
      attribute: 'href'
    }
  }
}

The above would allow you to pull in Components using the following markup:

src/templates/example.html
<module href="src/components/example.html"></module>

Copyright © 2022 Maizzle Edit this page on GitHub