umijs / plugins

🍣 The one-stop shop for official Umi plugins and presets.
349 stars 238 forks source link

fix(layout): root-entry-name variable error #862

Closed PeachScript closed 2 years ago

PeachScript commented 2 years ago

Description

更新 style/index.less 中引入 antd 默认主题变量的方式,避免报错:

Compile Error :“Variable @root-entry-name is undefined”

ref: https://github.com/ant-design/ant-design/issues/33853

codecov[bot] commented 2 years ago

Codecov Report

Merging #862 (4eee3ee) into master (b3a05ee) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #862   +/-   ##
=======================================
  Coverage   44.95%   44.95%           
=======================================
  Files          67       67           
  Lines        1706     1706           
  Branches      452      465   +13     
=======================================
  Hits          767      767           
+ Misses        937      930    -7     
- Partials        2        9    +7     
Impacted Files Coverage Δ
packages/plugin-locale/src/index.ts 82.19% <0.00%> (ø)
packages/plugin-qiankun/src/common.ts 60.52% <0.00%> (ø)
packages/plugin-ant-design-pro-block/src/index.ts 0.00% <0.00%> (ø)
packages/plugin-qiankun/src/master/modifyRoutes.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b3a05ee...4eee3ee. Read the comment docs.

afc163 commented 2 years ago

@zombieJ 看看吧,理论上不应该还有这个问题了。

zombieJ commented 2 years ago

这里引用的不对: https://github.com/umijs/plugins/blob/a3ddea6730d827f8ba94387a8b1779481df7d0c5/packages/plugin-layout/src/layout/style.less#L1

应该直接引用 antd/dist/antd.variable.less or antd/dist/antd.less ,dist 里的 less 都是包过的。直接引用内部的 less 文件才会报这个错。

PeachScript commented 2 years ago

这里引用的不对:

https://github.com/umijs/plugins/blob/a3ddea6730d827f8ba94387a8b1779481df7d0c5/packages/plugin-layout/src/layout/style.less#L1

应该直接引用 antd/dist/antd.variable.less or antd/dist/antd.less ,dist 里的 less 都是包过的。直接引用内部的 less 文件才会报这个错。

已更新成 antd/dist/antd.less ❤️