SCSS/SASS not working in micro frontend using React
P粉106301763
P粉106301763 2023-09-16 20:36:18
0
1
560

Hi, I am new to MicroFront End in React JS. I'm trying to use MicroFront End in React JS to handle SCSS. I have 2 files.

1:_variable.scss 2: style.scss

Below is the code I want to use in my application.

//_variable.scss

$base-color: #c6538c;

:export{
    baseColor:$base-color;
}
//style.scss

@import url('_variable.scss');

body{
    background: $base-color;
}

I am assigning a background value to the body of the application. But it doesn't work.

Any help would be great.

Thanks.

P粉106301763
P粉106301763

reply all(1)
P粉701491897

If you look at this post , you will see that you don't need to use the url() method. Try changing your style.scss file to:

@import '_variable';

body {
    background: $base-color;
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!