mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
doc: vite-plugin-components has been renamed to unplugin-vue-components (#5043)
This commit is contained in:
parent
46b216274f
commit
79ea8918e5
@ -105,7 +105,7 @@ And this plugin can load styles too, read [usage](https://github.com/ant-design/
|
|||||||
|
|
||||||
> FYI, babel-plugin-import's `style` option will importing some global reset styles, don't use it if you don't need those styles. You can import styles manually via `import 'ant-design-vue/dist/antd.css'` and override the global reset styles.
|
> FYI, babel-plugin-import's `style` option will importing some global reset styles, don't use it if you don't need those styles. You can import styles manually via `import 'ant-design-vue/dist/antd.css'` and override the global reset styles.
|
||||||
|
|
||||||
If you use Vite, you can use [vite-plugin-components](https://github.com/antfu/vite-plugin-components) to load on demand.
|
If you use Vite, you can use [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) to load on demand.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ import { Button } from 'ant-design-vue';
|
|||||||
|
|
||||||
> 注意,babel-plugin-import 的 `style` 属性除了引入对应组件的样式,也会引入一些必要的全局样式。如果你不需要它们,建议不要使用此属性。你可以 `import 'ant-design-vue/dist/antd.css` 手动引入,并覆盖全局样式。
|
> 注意,babel-plugin-import 的 `style` 属性除了引入对应组件的样式,也会引入一些必要的全局样式。如果你不需要它们,建议不要使用此属性。你可以 `import 'ant-design-vue/dist/antd.css` 手动引入,并覆盖全局样式。
|
||||||
|
|
||||||
如果你使用的 Vite,你可以使用 [vite-plugin-components](https://github.com/antfu/vite-plugin-components) 来进行按需加载
|
如果你使用的 Vite,你可以使用 [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) 来进行按需加载
|
||||||
|
|
||||||
## 配置主题和字体
|
## 配置主题和字体
|
||||||
|
|
||||||
|
@ -115,13 +115,16 @@ import 'ant-design-vue/dist/antd.css'; // or 'ant-design-vue/dist/antd.less'
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// vite.config.js
|
// vite.config.js
|
||||||
import ViteComponents, { AntDesignVueResolver } from 'vite-plugin-components';
|
import Components from 'unplugin-vue-components/vite'
|
||||||
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
plugins: [
|
plugins: [
|
||||||
/* ... */
|
/* ... */
|
||||||
ViteComponents({
|
Components({
|
||||||
customComponentResolvers: [AntDesignVueResolver()],
|
resolvers: [
|
||||||
|
AntDesignVueResolver(),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@ -117,13 +117,16 @@ import 'ant-design-vue/dist/antd.css'; // or 'ant-design-vue/dist/antd.less'
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// vite.config.js
|
// vite.config.js
|
||||||
import ViteComponents, { AntDesignVueResolver } from 'vite-plugin-components';
|
import Components from 'unplugin-vue-components/vite'
|
||||||
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
plugins: [
|
plugins: [
|
||||||
/* ... */
|
/* ... */
|
||||||
ViteComponents({
|
Components({
|
||||||
customComponentResolvers: [AntDesignVueResolver()],
|
resolvers: [
|
||||||
|
AntDesignVueResolver(),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user