Typescript plugin is complaining about imported SCSS #3429
Unanswered
MrCryptoWizard
asked this question in
Troubleshooting
Replies: 1 comment 3 replies
-
Try adding this to // CSS MODULES
declare module '*.module.css' {
const classes: { [key: string]: string };
export default classes;
}
declare module '*.module.scss' {
const classes: { [key: string]: string };
export default classes;
}
declare module '*.module.sass' {
const classes: { [key: string]: string };
export default classes;
}
// CSS
declare module '*.css';
declare module '*.scss';
declare module '*.sass';
declare module '*.less';
declare module '*.styl'; |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Howdy everyone,
Since I am not sure if this is a bug or simply something I am missing, I thought to post this here first.
I have a very simple project, where I import SCSS files into my typescript files.
I have a super simple plugin for transforming the SCCS (*.styles.scss) into CSS and then to an exporting string in a JS file. This works just fine in the DEV-env, despite the typescript plugin listing a bunch of errors for every line where I import a SCSS file. Now that I want to move to production however, these errors are blocking my build :-(
For every SCSS import I get a line like this:
Below are my snowpack config and the plugin source. If anybody has any idea what might cause this, I'm all ears and very thankful :-)
snowpack.config.js (abbreviated):
lit-scss-plugin.js (full):
Beta Was this translation helpful? Give feedback.
All reactions