DjMinify is a focused Visual Studio Code extension that minifies CSS and creates an external source map next to the original file.
For a file named styles.css, DjMinify creates or updates:
styles.css
styles.min.css
styles.min.css.map
Features
Right-click a .css file in the Explorer and select DjMinify: Minify CSS File.
Open a CSS file and run DjMinify: Minify CSS File from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
Save a source CSS file to automatically refresh its generated files when both the .min.css and .min.css.map files already exist.
Generate external source maps containing the original CSS source.
Work with local files and VS Code virtual or remote file systems.
DjMinify never creates generated files merely because a CSS file was saved. Automatic updates begin only after both output files have been created explicitly with the command. Files ending in .min.css are ignored as source files.
Usage
Select or open a source .css file.
Run DjMinify: Minify CSS File from the Explorer context menu or Command Palette.
Continue editing the source file. Future saves update the existing minified CSS and source map automatically.
Requirements
Visual Studio Code 1.85.0 or newer. No external tools or configuration are required.