Within an Angular application, I do D3 visuals through either plain D3 or Vega. There\'s also SCSS styling going on.
I\'d like to be able to refer to the same globa
Another option is to use raw-loader
, it is available by default in angular-cli. This way you can load raw scss file into ts component:
// Adding `!!` to a request will disable all loaders specified in the configuration
import scss from '!!raw-loader!./config.scss';
console.info('scss', scss);
You have to declare module in .d.ts
file:
declare module '!!raw-loader!./*.scss';
Then you can extract any information you want.
So instead of loading JSON into scss you can load scss into ts.