Arco Design Nuxt Module

Nuxt Module for Arco Design Vue. Automatically import components, icons and more.
Features
- ✨ auto import components
- ✨ auto import icons
- ✨ auto import Message, Notification
- ✨ auto import hooks
- ✨ auto import locale hooks
- 🔹 support custom prefix above
Quick Setup
- Add
arco-design-nuxt-module
dependency to your project
npx nuxi@latest module add arco-design-nuxt-module
[!NOTE]
If you do not have @arco-design/web-vue
installed, please install it first
pnpm install @arco-design/web-vue
- Add
arco-design-nuxt-module
to the modules
section of nuxt.config.ts
export default defineNuxtConfig({
modules: [
'arco-design-nuxt-module'
]
})
Options
If you need to customize the module, you can set arco
in nuxt.config.ts
Example
export default defineNuxtConfig({
arco: {
importPrefix: 'A',
hookPrefix: 'Arco',
locales: ['getLocale'],
localePrefix: 'Arco',
},
})
Full Type
interface Options {
components: false | string[]
componentPrefix: string
icons: false | string[]
iconPrefix: string
subComponents: Record<string, string[]>
imports: false | ('Notification' | 'Message')[]
importPrefix: string
locales: false | ('useLocale' | 'getLocale' | 'addI18nMessages')[]
localePrefix: string
hooks: false | ('useFormItem')[]
hookPrefix: string
importStyle: 'css' | 'less' | boolean
theme: string
noStylesComponents: string[]
importFrom: 'es' | 'lib'
}
That's it! You can now use Arco Design Nuxt Module in your Nuxt app ✨
Other
Credits
Thanks to: