less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17.02k stars 3.41k forks source link

3.11: @import (less) broken #3474

Closed Diablohu closed 4 years ago

Diablohu commented 4 years ago

im my less code:

@import (less) "~normalize.css/normalize.css";

before 3.11: import node_modules/normalize.css/normalize.css as less code into my less file after 3.11: Less try to find file node_modules/normalize.css/normalize.css.less and because this file does noe exist, building failed

Here's the error info from Webpack

@import (less) "~normalize.css/normalize.css";
^
Can't resolve 'normalize.css/normalize.css.less' in 'L:\Projects\koot\master\test\projects\simple\src'
      in L:\Projects\koot\master\test\projects\simple\src\critical.less (line 1, column 0)
    at L:\Projects\koot\master\node_modules\webpack\lib\NormalModule.js:316:20
    at L:\Projects\koot\master\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at L:\Projects\koot\master\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (L:\Projects\koot\master\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
 @ ./src/critical.js 9:2-28
turbidwater commented 4 years ago

We're seeing this issue too. Changelogs haven't been updated yet, so no word on if there was a syntax or functionality change.

martinpitt commented 4 years ago

This broke 3 of our projects as well. We dropped the markers, I suppose if a file really uses less syntax, it should be called *.less. So it's mostly a little inconvenience.

matthew-dean commented 4 years ago

Please see if this is fixed on 3.11.1

Diablohu commented 4 years ago

3.11.1 solved this problem for me thanks!