olback / es6-css-minify

Easily minify CSS and JavaScript in VS Code
https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify
MIT License
47 stars 13 forks source link

Using @import "base.css" will not re-minify when the base.css file changes with minify on change option #129

Open shaipetel opened 3 years ago

shaipetel commented 3 years ago

Describe the bug Assume I have 2 css files: base.css app.css

in app.css I import base.css "@import "base.css" in app.min.css - a copy of the base.css is added instead of the import statement.

Now - assume I made changes to base.css.

in the raw CSS version of app.css I have the @impot statement, which works fine when base.css is modified.

However. app.min.css will not be updated with the changes made in base.css until app.css is re-saved.

To Reproduce Steps to reproduce the behavior:

  1. Create base.css
  2. Add class ".class1{ ... }"
  3. Create app.css and minify it
  4. Use minify on save: "exists" settings
  5. Add @import "base.css" to app.css
  6. Review app.min.css -- class1 is there.
  7. Edit base.css and add ".class2{...}"
  8. Save base.css
  9. Review app.min.css -- class2 is missing.
  10. Open app.css and hit save
  11. Now class2 is added to app.css

Expected behavior Using the minify on save option should re-create the min file if any of the imported files change.

Desktop (please complete the following information):