I have an angular workspace with a library and an application which will consume that library.
I am trying to import a .scss file into a .ts typescript file inside the library.
So I added a file called global.d.ts to the src dir of the library with the following content
declare module '*.scss' {
const content: { [className: string]: string };
export = content;
}
then I referenced it in tsconfig.lib.json file of the lib like so:
"include": [
"src/**/*.d.ts"
]
But this configuration doesn't work for me since the error "Cannot find module 'path-to-scss-file.scss' or its corresponding type declarations" is shown when trying to build the lib.
Ps: the same configuration works fine if I import a .scss file inside the application project and the problem occurs only inside the library.