Comments (3)
Sorry for delay, this is an intresting problem...
We prefer to use built-in less loading logic firstly for compatibility reasons, for example, if you have your project without bundler, just less files and build them using less CLI you can rely on this behaviour (yes, for me it is strange too, but this is how less does), on the other side it is a bug, I want to say - Less should fix it in your code (it is a right solution), but I think they will not fix it, so I will try to find a better logic here
Hm, I can't reproduce, tests are here #530 and everything works fine, also I found we have other tests on such cases too, so maybe something wrong with your configuration (aliases, extra options, yarn/pnpm/npm monorepo options, something else).
I want to close it, but I am happy if you provide more details, for example reproducible test repo and I will try to help and fix it here, right now I don't see problems, so feel free to feedback and again sorry for delay
from less-loader.
You can use the example here to reproduce: less-import-test
from less-loader.
@treeFuck there is a bug on the vite side
Run in command line:
$ lessc webpack-test/index.less
Output is:
.test {
background-color: #f40;
}
* {
padding: 0;
margin: 0;
}
.test {
height: 200px;
width: 200px;
}
And our output is the same.
Why? Because less has a such behaviour (you can open an issue in less
repo about it), yeah, it is strange, but we want to be align with resolving/importing files to the original tool.
Feel free to feedback
from less-loader.
Related Issues (20)
- TypeError: this.getOptions is not a function HOT 1
- less object is empty in CRA project HOT 1
- Variable @z-index not found HOT 1
- TypeError: this.getPosition is not a function HOT 1
- less loader ignore the files out side the 'root' (where webpack.config.js live in) HOT 1
- webpack less-loader css modules fail HOT 5
- Slow build of file with too many imports HOT 3
- @apply detects as variable HOT 1
- ng test error with PhantomJS , getting less error HOT 1
- facing less error in angular 12 HOT 6
- this.getOptions is not a function HOT 1
- not find prependData and apendData information in README.md HOT 1
- Confusing `imports` explanation HOT 2
- Error: Module build failed
- Quieter logging HOT 2
- Attempt to track cache dependencies for synchronous loaded resources HOT 1
- less-loader not working with webpack-dev-server hmr HOT 8
- Invalid dependencies when webpack alias same with workspace folder HOT 5
- Compilation fails if CSS variable is last property of selector HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from less-loader.