question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modify 'import css' order more than 2 times, it will not work

See original GitHub issue
  • Operating System:mac os 10.14.4
  • Node Version:8.9.0
  • NPM Version:6.8.0
  • webpack Version:4.16.5
  • mini-css-extract-plugin Version:0.7.0

Expected Behavior

when I use webpack-dev-server. I modify css order. The out css should be modified at the same time. For example:

import 'a.less';
import 'b.less';

out:

.a{
}
.b{
}

modify:

import 'b.less';
import 'a.less';

out:

.b{
}
.a{
}

Actual Behavior

Only the first modification works. Don’t work from the second time. For example:

import 'a.less';
import 'b.less';

out:

.a{
}
.b{
}

modify:

import 'b.less';
import 'a.less';

out:

.b{
}
.a{
}

modify:

import 'a.less';
import 'b.less';

out:

.b{
}
.a{
}

not change

How Do We Reproduce?

Modify import more than 2 times

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-akaitcommented, May 31, 2019

Please create minimum reproducible test repo

0reactions
alexander-akaitcommented, Feb 18, 2021

Fixed for webpack v5 and v1.3.8

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS is imported in different order between dev and production
The order they are imported screws up the css as the global styles is expected to be imported first. While playing around, i...
Read more >
CSS @import and the order of it - Stack Overflow
I found a solution, the only way to do it is to include all 3 css file to one file only by hand....
Read more >
import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >
CSS @import Rule - W3Schools
The @import rule allows you to import a style sheet into another style sheet. The @import rule must be at the top of...
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
1import React, {Component} from 'react'; 2import ReactDOM from ... As you can see in the above code, the problem is right where the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found