Update unplugin doc
parent
8d913692e7
commit
ff3fb8104e
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>
|
||||
The <a href="https://github.com/unplugin/unplugin-vue-components" target="_blank" rel="noopener noreferrer">unplugin-vue-components</a> library can automatically import and register PrimeVue components with the built-in resolver. Let's
|
||||
begin with installing the library.
|
||||
The <a href="https://github.com/unplugin/unplugin-vue-components" target="_blank" rel="noopener noreferrer">unplugin-vue-components</a> library can automatically import and register PrimeVue components with the help of
|
||||
<i>@primevue/auto-import-resolver</i>. Begin with installing the packages as dev dependencies.
|
||||
</p>
|
||||
<DocSectionCode :code="code1" hideToggleCode importCode hideStackBlitz />
|
||||
<p>Next step would be adding the <i>PrimeVueResolver</i> at vite.config using the <i>Components</i> plugin.</p>
|
||||
|
@ -22,6 +22,7 @@ export default {
|
|||
code1: {
|
||||
basic: `
|
||||
npm i unplugin-vue-components -D
|
||||
npm i @primevue/auto-import-resolver -D
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
|
@ -29,7 +30,7 @@ npm i unplugin-vue-components -D
|
|||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import {PrimeVueResolver} from 'unplugin-vue-components/resolvers';
|
||||
import {PrimeVueResolver} from '@primevue/auto-import-resolver';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
Loading…
Reference in New Issue