I'm building an app with NativeScript 6.4.1 and Angular 8.
I need to import my sass variables into all of my component scss files.
component.scss
@import '../../../css/variables';
.sidedrawer-header {
background-color: $vivid_cerulean;
padding: 50px;
}
.sidedrawer-content {
background-color: $vivid_cerulean2;
}
_variables.scss
$navy_blue: #105195;
$vivid_cerulean: #28abe2;
$white: #ffffff;
$dark_navy_blue: #063260;
$light_grey: #eeeeee;
$error_red: #eb2026;
$vivid_cerulean2: #3eb4e5;
I see that the import statements could be cumbersome in the future with all the different paths.
Is there a way to make the import statement cleaner?
I would like it to be something like this:
@import '~variables'
My project has a webpack.config.js file, and an agular.json file.