Is there a way to get rid of the Unused CSS selector warning in VS Code? I keep getting this warning in all files where I use
<style lang="scss">
. While I'm aware that I don't use the .btn
class in some components, I still want it as a global CSS rule.
https://i.sstatic.net/YX2Dd.png
This is what my svelte.config.js
looks like:
const config = {
onwarn: (warning, handler) => {
const { code, frame } = warning;
if (code === "css-unused-selector")
return;
handler(warning);
},
preprocess: [
preprocess({
defaults: {
style: 'scss'
},
postcss: true,
scss: {
prependData: `@import 'src/scss/global.scss';`
}
})
],
};
I would appreciate any help with this issue. Can someone assist me?