24.0.11 • Published 1 year ago

bunny_vite-plugin-uni-components v24.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@uni-helper/vite-plugin-uni-components

Forked from unplugin-vue-components and modified to adapt UniApp.

NPM version

Install

pnpm i -D @uni-helper/vite-plugin-uni-components

Usage

// vite.config.ts
import { defineConfig } from 'vite'
import Uni from '@dcloudio/vite-plugin-uni'
import Components from '@uni-helper/vite-plugin-uni-components'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    // make sure put it before `Uni()`
    Components(),
    Uni(),
  ],
})

Component type prompt

If you use pnpm, please create a .npmrc file in root, see issue.

// .npmrc
public-hoist-pattern[]=@vue*
// or 
// shamefully-hoist = true

see more in unplugin-vue-components

License

MIT License © 2023-PRESENT Neil Lee