webpack-contrib / mini-css-extract-plugin

Lightweight CSS extraction plugin
MIT License
4.65k stars 389 forks source link

[bug] Missing semicolon after "@import url(path/to/css) screen and (max-width:1024px) " #1049

Closed Fi2zz closed 7 months ago

Fi2zz commented 12 months ago

Actual Behavior


// missing  `;` at the end of line
@import url(http://some/path/to/css.css) screen and (max-width:1024)

Expected Behavior


// should have  `;` at the end of line
@import url(http://some/path/to/css.css) screen and (max-width:1024);

How Do We Reproduce?

this can be found in this line. https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/src/index.js#L1367


 // HACK for IE
        // http://stackoverflow.com/a/14676665/1458162
        if (module.media) {
          // insert media into the @import
          // this is rar
          // TODO improve this and parse the CSS to support multiple medias
          content = content.replace(/;|\s*$/, module.media); //**!!!!!** module.media missing ';'
        }