WebStorm创建[name].scss时生成冗余文件及重复CSCC文件,如何解决?
Hey there! Let's tackle these two WebStorm issues one by one—they're pretty common, so you're not alone.
1. Fixing Duplicate CSCC Files
Those duplicate CSCC files are likely coming from a misconfigured tool, rogue plugin, or IDE cache glitch. Here's how to resolve it:
- Check File Watchers: Open WebStorm settings (press
Ctrl+Alt+Sor go toFile > Settings), then navigate toTools > File Watchers. Look for any watchers linked to CSCC/SCSS that might be spawning duplicate files. If you spot an extra or unnecessary one, select it and click the minus (-) button to remove it. - Disable Suspect Plugins: Head to
Settings > Pluginsand check for third-party SCSS/CSCC compilation plugins. Try disabling them temporarily to see if the duplicate files stop appearing. - Clear IDE Cache: Corrupted cache can cause odd file behavior. Go to
File > Invalidate Caches..., check the boxes for "Clear file system cache and local history" and "Invalidate and Restart", then confirm. This refreshes WebStorm's cache and often fixes duplicate file issues.
2. Stopping Automatic Generation of .css and .css.map Files for .scss
This happens because WebStorm's built-in Sass compiler is set to auto-compile SCSS to CSS by default. Here's how to turn that off:
- Open WebStorm settings (
Ctrl+Alt+SorFile > Settings). - Navigate to
Languages & Frameworks > Stylesheets > Sass/SCSS/LESS. - In the Compiler section, uncheck the box next to
Compile Sass/SCSS files to CSS. This will stop WebStorm from automatically generating.cssand.css.mapfiles whenever you create or edit an.scssfile. - If you still want to compile SCSS manually occasionally, leave the box unchecked and use the manual option: right-click the
.scssfile >Compile Sasswhen you need it.
内容的提问来源于stack exchange,提问作者J.Michael
相关产品推荐
相关产品推荐

