less.js: Missing selector when using sourcemaps, plugins, and compiling Less files in parallel
I have some code like bottom.
@root-name: business-bundle
/* other file */
.@{root-name} .wrapper{
/* css... */
}
When webpack use less 3.12.2, that is ok. But when use 3.13.0, webpack build error.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 29 (14 by maintainers)
Commits related to this issue
- Fixes #3574 — committed to matthew-dean/less.js by matthew-dean 4 years ago
- Fixes #3574 (#3575) * Fixes #3574 * Bump version and dist files — committed to olederle/less.js by matthew-dean 4 years ago
@PengJiyuan @kirazxyun @Justineo etc please try testing with
less@3.13.0-alpha.3
4.0.0 is also published, which contains this fix.
3.13.1 published
@PengJiyuan You’re right, the code in question shouldn’t fail outputting the chunk if source map building doesn’t work. It should be like:
That would be a short-term fix, with the longer term fix being figuring out why one of the files has an incorrect import mapping. (It’s probably being re-used when compiled in parallel.)
So I can do the temporary band-aid solution soon, and figure out the cause after.
https://github.com/kirazxyun/less-question
This repo can reproduce the problem. You can run with ‘npm run build’,then view the results in the dist folder.