Skip to content

🔧 unplugin-auto-import-ahooks is a resolver for unplugin-auto-import that enables on-demand importing of ahooks.

License

Notifications You must be signed in to change notification settings

recallwei/unplugin-auto-import-ahooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unplugin-auto-import-ahooks

English / 简体中文

unplugin-auto-import-ahooks is a resolver for unplugin-auto-import that enables on-demand importing of ahooks.

Features

  • Support Vite, Webpack and more
  • Automatically imports hooks from ahook

Installation

npm

npm i -D unplugin-auto-import-ahooks unplugin-auto-import

yarn

yarn add -D unplugin-auto-import-ahooks unplugin-auto-import

pnpm

pnpm add -D unplugin-auto-import-ahooks unplugin-auto-import

bun

bun add -D unplugin-auto-import-ahooks unplugin-auto-import

Usage

Vite

// vite.config.ts
import AutoImport from 'unplugin-auto-import/vite'
import AhooksResolver from 'unplugin-auto-import-ahooks'

export default defineConfig({
  plugins: [
    AutoImport({
      resolvers: [AhooksResolver()]
    })
  ]
})

Webpack

// webpack.config.js
const AhooksResolver = require('unplugin-auto-import-ahooks')

module.exports = {
  /* ... */
  plugins: [
    require('unplugin-auto-import/webpack')({
      resolvers: [AntdAhooksResolverResolver()]
    })
  ]
}

License

MIT License © 2024 Bruce Song

About

🔧 unplugin-auto-import-ahooks is a resolver for unplugin-auto-import that enables on-demand importing of ahooks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published