当我要自定义主题时,此失败显示。
有谁知道该如何解决?
我的项目Github链接是here。
Failed to compile.
./src/themes/light/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/themes/light/index.scss)
SassError: no mixin named euiScreenReaderOnly
on line 3 of node_modules/@elastic/eui/src/components/accessibility/_screen_reader.scss
from line 1 of node_modules/@elastic/eui/src/components/accessibility/_index.scss
from line 4 of node_modules/@elastic/eui/src/components/index.scss
from line 7 of /Users/austin/Documents/sideproject/eui-layout/src/themes/light/index.scss
>> @include euiScreenReaderOnly;
-----------^
最佳答案
订单需要正确且不起作用
@import错误'../../../node_modules/@elastic/eui/src/global_styling/ 函数 / index';
正确@import'../../../node_modules/@elastic/eui/src/global_styling/index.scss';
@import './color.scss';
$euiSize: 14px;
// Global styling
@import '../../../node_modules/@elastic/eui/src/global_styling/index.scss';
@import '../../../node_modules/@elastic/eui/src/components/index.scss'
关于javascript - 我跟随文档自定义主题时使用弹性ui时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62339801/