webpack-contrib / mini-css-extract-plugin

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

add ';'to module.media #1051

Closed Fi2zz closed 10 months ago

Fi2zz commented 1 year ago

This PR contains a:

Use-Case

Giving css with at-rule-import


@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" screen and (min-width:640px);
@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"; 

div{
  color:red;
  font-size:14px
}

Before bugfix


@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" screen and (min-width:640px)@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"; 

div{
  color:red;
  font-size:14px
}

After bugfix


@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" screen and (min-width:640px);
@import "https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"; 

div{
  color:red;
  font-size:14px
}
linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

Fi2zz commented 11 months ago

Looks good, can we add a test case?

please check here @alexander-akait

codecov[bot] commented 11 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d5e540b) 90.54% compared to head (5c365d3) 89.96%. Report is 2 commits behind head on master.

Files Patch % Lines
src/index.js 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1051 +/- ## ========================================== - Coverage 90.54% 89.96% -0.59% ========================================== Files 5 5 Lines 857 857 Branches 243 243 ========================================== - Hits 776 771 -5 - Misses 71 75 +4 - Partials 10 11 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.