babel-plugin-veui

Import VEUI components with ease.

Usage no npm install needed!

<script type="module">
  import babelPluginVeui from 'https://cdn.skypack.dev/babel-plugin-veui';
</script>

README

babel-plugin-veui

This Babel plugin enables you to wrtie simpler import statements by converting such statements:

import { Button, Input } from 'veui'

...into:

import Button from 'veui/components/Button'
import Input from 'veui/components/Input'

...just like babel-plugin-lodash does.

You can also use the following prefixed version to make it easier to register components using object property shorthand:

import { VeuiButton, VeuiInput } from 'veui'

export default {
  components: {
    VeuiButton,
    VeuiIcon
  }
}

...or...

import { VButton, VInput } from 'veui'

export default {
  components: {
    VButton,
    VIcon
  }
}

So you can use <veui-button> or <v-button> in templates.