You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same issue. I think in generally this error happens when the file is compiled by the css loader for more than once. Check your config to see if there are duplicated css loaders.
@mondaychen is right. You have probably got more than one loader config containing style-loader and css-loader. If their include/exclude properties allow an intersection (a source file might be matched by both) you might be screwed already... :-/
Guess the only fix is making sure there is no intersection.
@afrianjunior It worked for me after I changed the order of loaders from require('!css-loader!style-loader!./styles.css'); to require('!style-loader!css-loader!./styles.css');
same here But I solve this shit with using loader:'css-loader!style-loader'
Blv me Don't Use 'use' instead u can use 'loader' which is the keyword of the prev version of the weback and I think it's better than 'use'
I think it's because the css and style loader are not updated ...
I had this same problem as well as one with scss and sass loader... By default the full npm vue app install is loading css and sass for you. I left only the rule of style-loader on the regex of css and it's perfect!
Activity
LeoMartinDev commentedon Oct 21, 2016
Same here
zhyc9de commentedon Oct 23, 2016
i don't know why it happened , but i found a solution
don't use css loader , just import your css file
harwinvoid commentedon Dec 8, 2016
Same here
harwinvoid commentedon Dec 8, 2016
I fixed it by remove
{ test: /\.css$/, loader: 'style!css' }
from webpack.config.js. But i don't know why. anyone could tell me ?yinshipeng commentedon Dec 8, 2016
Same here
Jacke commentedon Dec 19, 2016
same. webpack the most shitty software that I ever seen. It's working by magic and nobody know how to fix it
mondaychen commentedon Jan 11, 2017
I had the same issue. I think in generally this error happens when the file is compiled by the css loader for more than once. Check your config to see if there are duplicated css loaders.
andywer commentedon Jan 15, 2017
@mondaychen is right. You have probably got more than one loader config containing
style-loader
andcss-loader
. If theirinclude
/exclude
properties allow an intersection (a source file might be matched by both) you might be screwed already... :-/Guess the only fix is making sure there is no intersection.
domingohui commentedon Jan 26, 2017
I saw similar things here #197
But it still doesn't work for me even if I append
style!
orcss!
rafaelboschini commentedon Jan 26, 2017
same here ):
fengyongze commentedon Feb 27, 2017
same here
michael-ciniawsky commentedon Mar 6, 2017
@LeoMartinDev @zhyc9de @harwinvoid @yinshipeng @Jacke @rafaelboschini @fengyongze you guys all using VueJS ? If then please use
vue-loader
instead. I reopen if my assumption is false 😛wnewstar commentedon Jul 3, 2017
@michael-ciniawsky
why need use
vue-loader
instead? I do it, but have some other question.wi-ski commentedon Aug 19, 2017
how do you fix the Bs
heythanks commentedon Aug 29, 2017
remove this{ test: /.css$/, loader: 'style!css' } has no error,but css file can't effect this website
vikashpisces commentedon Aug 31, 2017
@afrianjunior It worked for me after I changed the order of loaders from
require('!css-loader!style-loader!./styles.css');
torequire('!style-loader!css-loader!./styles.css');
tiserge2 commentedon Oct 5, 2017
@vikashpisces thanks guys! it works fine for me after doing it as you said
codeaimh commentedon Oct 23, 2017
guys how I know if I have a duplicated loader?
ghost commentedon Jan 12, 2018
same here But I solve this shit with using
loader:'css-loader!style-loader'
Blv me Don't Use
'use'
instead u can use'loader'
which is the keyword of the prev version of the weback and I think it's better than 'use'I think it's because the css and style loader are not updated ...
buddyackerman commentedon Mar 29, 2018
None of the above work. I'm using Angular 5 and have ejected the project from the cli so that I can modify the webpack config.
Here's the entry section:
and here's the module definition:
I've also tried this:
They all produce the same error.
liyanana commentedon Sep 20, 2018
same here.how to solve??? I cant find the answer.
atreyhazelhispanic commentedon Oct 14, 2018
I had this same problem as well as one with scss and sass loader... By default the full npm vue app install is loading css and sass for you. I left only the rule of style-loader on the regex of css and it's perfect!
SeedyROM commentedon Jan 4, 2019
@atreyhazelhispanic Could you share some example code for how you solved this?
yeahhhz commentedon Jan 15, 2019
Try install a low version loader
TylerNGUP commentedon Jun 9, 2019
same here,因为要先加载css-loader,然后才加载style-loader,so must write like this : loader='style-loader!css-loader', after 2.0,must add 后缀,-loader。
pangjunpeng commentedon Dec 29, 2020
oh! your english is very well👏