cssmin not correctly handling @import

前端 未结 6 1671
粉色の甜心
粉色の甜心 2021-02-08 01:40

I am using cssmin on files containing @imports. cssmin is recursively importing local files correctly, but for imports that point to a URL the imports are left inline. This ma

6条回答
  •  悲哀的现实
    2021-02-08 02:19

    I had something like this in the styles.scss:

    @import url(custom-fonts.css);
    

    My problem was the @import wasn't able to find the files because the root path was missing. Here's what I did with yeoman angular generator Gruntfile.js config:

    cssmin: {
      options: {
        root: '<%= yeoman.dist %>/styles/'
      }
    },
    

    Useful link grunt-contrib-cssmin issue #75

提交回复
热议问题