webpack-contrib / mini-css-extract-plugin

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

Styles are out of order when HMR and async code splitting enabled #955

Closed h-a-n-a closed 2 years ago

h-a-n-a commented 2 years ago

Bug report

How Do We Reproduce?

You may refer to this repo directly: https://github.com/h-a-n-a/issue_0616_mini_css_hmr

Please paste the results of npx webpack-cli info here, and mention other relevant information

❯ npx webpack-cli info

  System:
    OS: macOS 12.1
    CPU: (8) arm64 Apple M1
    Memory: 87.59 MB / 16.00 GB
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v16.13.2/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Browsers:
    Chrome: 102.0.5005.115
    Safari: 15.2
  Packages:
    css-loader: ^6.7.1 => 6.7.1
    html-webpack-plugin: ^5.5.0 => 5.5.0
    style-loader: ^3.3.1 => 3.3.1
    webpack: ^5.72.1 => 5.72.1
    webpack-cli: ^4.9.2 => 4.9.2
    webpack-dev-server: ^4.9.2 => 4.9.2
alexander-akait commented 2 years ago

Fixed https://github.com/webpack-contrib/mini-css-extract-plugin/pull/982/