$npm install node-sass
or
$yarn add node-sass
project
|--src
+|--Component.scss
+|--Component.js
$red: red;
@mixin square($size){
width: $size*1px;
height: $size*1px;
}
.box{
background: $red;
@include square(1);
}
import './Component.scss';
const Component = () => {
return <div className="box">
</div>;
}