When using client-side compilation for less, and if there are errors, Less is not showing me what those errors are. It's supposed to insert some HTML, but it seems not to be doing this. The HTML on the page after Less runs looks like:
<html>
<head>
<link rel="stylesheet/less" type="text/css" href="/Content/less/all.less">
<script src="/Content/js/libs/less-1.3.0.min.js" type="text/javascript"></script>
<style type="text/css" media="screen" id="less:error-message">
--SNIP--
}</style>
</head>
<body>
</body>
</html>
As you can see, the less error css is generated, but not the html.
Add this script before including less.js in your head:
<script type="text/javascript">less = { env: 'development' };</script>
This tells less.js that it is OK to display error messages in the browser as we are still dev'ing the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With