0

当我想自定义主题时,这会失败。有谁知道如何解决这个问题?

我的项目 Github 链接在这里

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;

   -----------^
4

1 回答 1

0

订单需要正确,不要进入功能

错误的@import '../../../node_modules/@elastic/eui/src/global_styling/functions /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'
于 2020-06-16T08:22:29.573 回答