Skip to content

Commit

Permalink
docs: use less-loader with lib folder in cjs (#38872)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX committed Nov 23, 2022
1 parent e12580b commit ea6a801
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/react/migration-v5.en-US.md
Expand Up @@ -165,9 +165,9 @@ npm install --save antd@5.x

If you using antd less variables, you can use compatible package to covert it into v4 less variables and use less-loader to inject them:

```jsx
import { theme } from 'antd';
import { convertLegacyToken } from '@ant-design/compatible';
```js
const { theme } = require('antd/lib');
const { convertLegacyToken } = require('@ant-design/compatible/lib');

const { defaultAlgorithm, defaultSeed } = theme;

Expand Down
6 changes: 3 additions & 3 deletions docs/react/migration-v5.zh-CN.md
Expand Up @@ -159,9 +159,9 @@ npm install --save antd@5.x

如果你使用到了 antd 的 less 变量,通过兼容包将 v5 变量转译成 v4 版本,并通过 less-loader 注入:

```jsx
import { theme } from 'antd';
import { convertLegacyToken } from '@ant-design/compatible';
```js
const { theme } = require('antd/lib');
const { convertLegacyToken } = require('@ant-design/compatible/lib');

const { defaultAlgorithm, defaultSeed } = theme;

Expand Down

0 comments on commit ea6a801

Please sign in to comment.