Less build fails
See original GitHub issueHi,
I have an ejected CRA app where I am trying to integrate semantic-ui-less
. Here is my webpack.dev.config https://gist.github.com/benoj/908f20a64066ca8606733c36206bccdd
(not much changed)
However, when I require the less
files I am getting the following issue:
Module build failed:
module.exports = __webpack_public_path__ + "static/media/accordion.8c4c433e.less";
^
Unrecognised input
in /Users/benflowers/Projects/candidate/candidate-ui-cra/node_modules/semantic-ui-less/definitions/modules/accordion.less (line 1, column 15)
Is there anything specific with CRA configuration which could be causing this?
I have asked on StackOverflow and Webpack Gitter but not getting any response
Cheers,
Ben
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Less module build failed in webpack after migrating from grunt
I can't figure out how to compile my less files to css and then include them in my build folder, without the app...
Read more >Command Line Usage - Less CSS
Compile .less files to .css using the command line. Heads up! ... Default: html. Set the method of error reporting when compilation fails....
Read more >#58935 (go @1.13: build fails on 10.9 and less) – MacPorts
I saw this on my 10.7 system this morning, and <https://ports.macports.org/port/go/builds> shows it affects 10.9 and less.
Read more >807974 - Be less chatty when the build fails - Bugzilla@Mozilla
Here's what mach currently shows: Error running mach: ['build'] The error occured in code that was called by the mach command. This is...
Read more >CSS, SCSS, and Less support in Visual Studio Code
Find out how Visual Studio Code can support your CSS, SCSS and Less ... Note: If your build fails or you see an...
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 FreeTop 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
Top GitHub Comments
I hope the comment is not too late but think it has to do with the standard file-loader rule in the
oneOf: [...]
rule of yourwebpack.config.*
file. It was the same problem as you described.I have changed the exclude statement of the standard file-loader:
from this:
to this:
This excludes all .less, .config, .variables and .overrides files from the file-loader. I think it’s not the best solution but it worked for me and produced no other errors.
So after reading through all the code and starting to grok how this stuff all works…
It turns out you can use the same react-app-rewired
config-overrides.js
file to modify the loader. This is the same way that the re-writing modules do it. Something like this should do the trick, and without ejecting. 🎉