Imported less files are not being prefixed
See original GitHub issuesee https://github.com/Dakuan/postcss-webpack-bug
bar.less
imports foo.less
,
bar
gets prefixed correctly: https://github.com/Dakuan/postcss-webpack-bug/blob/master/bug.css#L6
but foo
gets ignored: https://github.com/Dakuan/postcss-webpack-bug/blob/master/bug.css#L2
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Missing Font-Awesome.less variables in my .less file after ...
I got an interesting parse error in my project. I use Font Awesome and I imported it into my app.less file. (I use...
Read more >Prefix partial LESS source files with underscore #4907 - GitHub
I use Web Essentials in my .Net projects, however by default, when compiling it will generate css files for each less file in...
Read more >Less - Prepros
Less (which stands for Leaner Style Sheets) is an extension of CSS that enables you to use things like variables, nested rules, inline...
Read more >Introducing Sass Modules - CSS-Tricks
Import files with @use · The file is only imported once, no matter how many times you @use it in a project. ·...
Read more >Sass: @import
Sass extends CSS's @import rule with the ability to import Sass and CSS stylesheets, providing access to mixins, functions, and variables and combining ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@avindra @Dakuan
It’s been a while since I’ve used webpack and i’d be damned if I knew the point of these loaders anymore. I hate you so much webpack.
css-loader expects CSS code, there’s nothing more to it than that. pass in your final compiled CSS into css-loader.
I guess the output of css-loader is not a stream of CSS, thus you can’t pipe that ouput into postcss-loader.
style-loader|css-loader
is the way to do it just with cssstyle-loader|css-loader|postcss-loader
is the way to post-process cssstyle-loader|css-loader|less-loader
is the way to do it if you want to use lessstyle-loader|css-loader|postcss-loader|less-loader
is the way to post-process the compiled less (css)As I understand it, you need to pipe the output of the compiled css into the css-loader. Thus, this should be the correct order:
…which results in: