mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
docs(auto-import-resolver): add Rspack usage (#12242)
This commit is contained in:
parent
80f600af93
commit
5ccaa836ee
@ -76,6 +76,22 @@ module.exports = {
|
||||
};
|
||||
```
|
||||
|
||||
### Rspack
|
||||
|
||||
```ts
|
||||
// rspack.config.js
|
||||
import Components from 'unplugin-vue-components/rspack';
|
||||
import { VantResolver } from '@vant/auto-import-resolver';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
Components({
|
||||
resolvers: [VantResolver()],
|
||||
}),
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
### Vue CLI
|
||||
|
||||
```ts
|
||||
|
@ -76,6 +76,22 @@ module.exports = {
|
||||
};
|
||||
```
|
||||
|
||||
### Rspack
|
||||
|
||||
```ts
|
||||
// rspack.config.js
|
||||
import Components from 'unplugin-vue-components/rspack';
|
||||
import { VantResolver } from '@vant/auto-import-resolver';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
Components({
|
||||
resolvers: [VantResolver()],
|
||||
}),
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
### Vue CLI
|
||||
|
||||
```ts
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@vant/auto-import-resolver",
|
||||
"version": "1.0.0",
|
||||
"description": "Vant auto import resolver base unplugin-vue-components",
|
||||
"description": "Vant auto import resolver based on unplugin-vue-components",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.mjs",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
Loading…
x
Reference in New Issue
Block a user