Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse minimized css import #18346

Merged
merged 1 commit into from Apr 24, 2024

Conversation

ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Apr 23, 2024

fix case @import "./style.css";body{}

before:

.class-in-style-css{};

ody{}

after:

.class-in-style-css{};

body{}

there are some new lines introduced in the snapshot, because before the new line is removed unexpectedly:

before:

@import "./style.css";\n\nbody{}
//                      second \n: the removed new line
//                    first \n: end + 1

after:

@import "./style.css";\n\nbody{}
//                      second \n: keep it as is
//                    first \n: the removed new line

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?

added

Does this PR introduce a breaking change?

no

What needs to be documented once your changes are merged?

none

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@alexander-akait alexander-akait merged commit 77c4d0c into webpack:main Apr 24, 2024
52 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants