English / 简体ä¸æ–‡
unplugin-auto-import-ahooks
is a resolver for unplugin-auto-import that enables on-demand importing of ahooks.
- Support
Vite
,Webpack
and more - Automatically imports hooks from
ahook
npm i -D unplugin-auto-import-ahooks unplugin-auto-import
yarn add -D unplugin-auto-import-ahooks unplugin-auto-import
pnpm add -D unplugin-auto-import-ahooks unplugin-auto-import
bun add -D unplugin-auto-import-ahooks unplugin-auto-import
// 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.config.js
const AhooksResolver = require('unplugin-auto-import-ahooks')
module.exports = {
/* ... */
plugins: [
require('unplugin-auto-import/webpack')({
resolvers: [AntdAhooksResolverResolver()]
})
]
}
MIT License © 2024 Bruce Song