Allow importing scss files in JS
What does this MR do?
- Add sass-loader to allow importing SCSS into JS
- Fix
.css
regex in webpack config for CSS files
Was needed to import some colors from variables.scss
in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7538#note_104940229
With this MR we can export vars from SCSS and use them.
// variables.scss
$red: #f00;
:export {
red: $red;
}
// something.js
import { red } from './variables.scss';
console.log(red) // #f00
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides
Edited by Simon Knox