less-loader | Compiles Less to CSS | Build Tool library

 by   webpack-contrib JavaScript Version: 12.2.0 License: MIT

kandi X-RAY | less-loader Summary

kandi X-RAY | less-loader Summary

less-loader is a JavaScript library typically used in Utilities, Build Tool, Webpack applications. less-loader has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.

Compiles Less to CSS
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              less-loader has a medium active ecosystem.
              It has 935 star(s) with 200 fork(s). There are 19 watchers for this library.
              There were 4 major release(s) in the last 12 months.
              There are 2 open issues and 248 have been closed. On average issues are closed in 89 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of less-loader is 12.2.0

            kandi-Quality Quality

              less-loader has 0 bugs and 0 code smells.

            kandi-Security Security

              less-loader has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              less-loader code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              less-loader is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              less-loader releases are available to install and integrate.
              Deployable package is available in Maven.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed less-loader and discovered the below as its top functions. This is intended to give you an instant insight into less-loader implemented functionality, and help decide if they suit your requirements.
            • Creates a Less plugin .
            • Create a Less loader
            • Creates the loader for the given loader context .
            • Resolves the loader .
            • Normalize map .
            • Return true if the given URL is unsupported
            Get all kandi verified functions for this library.

            less-loader Key Features

            No Key Features are available at this moment for less-loader.

            less-loader Examples and Code Snippets

            Webpack: what are modules with no loaders? How to optimize them?
            JavaScriptdot img1Lines of Code : 36dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
                  {
                    test: /\.jsx?$/,
                    // include: path.resolve(__dirname, 'src'),
                    use: ['babel-loader'],
                  },
            
             SMP  ⏱  Loaders
            babel-loader took 1 min, 0.222 secs
              module count = 2946
            typings-for-cs
            How do I make "import * as style from from X.less" work?
            TypeScriptdot img2Lines of Code : 30dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install less-loader css-loader style-loader
            
            module.exports = {
              // ...
              module: {
                rules: [
                  // ...
                  {
                    test: /\.less/,
                    use: [
                      'style-loader',
                      'css-loader',
               
            How can I watch less file changes after ejecting create react app
            JavaScriptdot img3Lines of Code : 2dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save-dev less less-loader
            
            React-table css not loading is webpack the issue?
            JavaScriptdot img4Lines of Code : 60dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
              {
                test: reStyle,
                rules: [
                  // Convert CSS into JS module
                  {
                    issuer: { not: [reStyle] },
                    use: 'isomorphic-style-loader',
                  },
            
            
                  // Process internal/project styles (from src folder)
                  {
                 
            How to use LESS in React 16.7 with webpack 4.29?
            JavaScriptdot img5Lines of Code : 10dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            1. Go to webpack.config.js file and search for cssRegex change it from /\.css$/ to /\.(?:le|c)ss$/
            2. install less and less loader using npm install -S less less-loader
            3. search for getStyleLoaders method in webpack config file and add th
            how to get those 3 things working together: webpack, less and angular 2+?
            JavaScriptdot img6Lines of Code : 42dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save-dev less-loader less
            
            import { Component } from '@angular/core';
            
            @Component({
                selector: 'someComp',
                templateUrl: './someComp.component.html',
                styleUrls: ['./someComp.component.less'] 
            Applying loaders to files imported via resolve.modules in webpack
            JavaScriptdot img7Lines of Code : 18dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save vue
            npm install --save-dev babel-core babel-loader css-loader less-loader vue-loader vue-template-compiler webpack
            
            resolve: {
                modules: [
                    path.resolve("../../common"),
                    path.res
            less compiled failed with vue-cli
            JavaScriptdot img8Lines of Code : 2dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm i less less-loader -D
            
            ASP.NET core angular SPA template add Custom bootstrap theme to webpack.config.js
            JavaScriptdot img9Lines of Code : 37dot img9License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save less less-loader 
            
            less/site.less
            less/bootstrap/bootstrap.less
            less/bootstrap/variables.less
            
            /* less/bootsrap/bootstrap.less */
            /* import bootstrap from source */
            @import
            Webpack Angular 2 less-loader config
            TypeScriptdot img10Lines of Code : 29dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install --save-dev less
            npm install --save-dev less-loader
            
            var ExtractTextPlugin = require('extract-text-webpack-plugin');
            
            {
                test: /\.less$/,
                exclude: helpers.root('src', 'app')

            Community Discussions

            QUESTION

            Meteor + Semantic React
            Asked 2022-Mar-15 at 10:45
            LAST EDIT :

            never use npm raw command in meteor. always meteor npm. That is the reason why everything broke.

            AND do upgrade step by step , version to the nearest version.

            I think that's all that causes this headache.

            Everything works now.

            Thanks !

            EDIT :

            After trying all the steps ahead ... I remove jquery / less and semantic:ui from meteor

            ...

            ANSWER

            Answered 2022-Feb-28 at 21:21

            I think you have created a bit of a mess for yourself. I was able to create a simple meteor app using semantic-ui-react as follows:

            Source https://stackoverflow.com/questions/71262062

            QUESTION

            How to load fonts from LESS file with Webpack 5?
            Asked 2022-Feb-10 at 23:24

            I am using Webpack 5 and loading fonts and other styles from a .less file. However, the fonts/styles do not seem to be loading, and I'm trying to figure out why.

            bootstrap.less

            ...

            ANSWER

            Answered 2022-Feb-09 at 22:11

            I was able to fix this issue by adding:

            *{font-family:Gibson;}

            to my bootstrap.less file. I'm really uncertain this is the best way to do this, but it does work.

            Source https://stackoverflow.com/questions/71055695

            QUESTION

            webpack running with different errors on npm install
            Asked 2022-Feb-04 at 07:46

            when I run npm install or npm ci that seems to trigger a webpack build which produces tons of incorrect errors. All of them referring to not found dependencies which are definitely there. In addition, npm ci seems to trigger even more of these errors than npm install does.

            When I run webpack build, the build runs just fine however. I am quite surprised by that behaviour as I don't seem to find any documentation on what's triggering this webpack run.

            I'd like to better understand:

            • what triggers webpack during npm install? (I would very much just like that to install dependencies)
            • why does it show all these weird error messages?

            I have installed:

            • WSL 2 (Ubuntu 21.04) on Windows 11
            • NPM 7.5.2
            • Webpack ^5.65.0

            Sample error output looks like this:

            ...

            ANSWER

            Answered 2022-Feb-04 at 07:46

            Wipe node_modules and reinstall. The reason for doing so is basically what @Harshal Patil comment is all about, i.e. conflicts after packages trigger their install/postinstall scripts.

            (This was the suggestion made in my comment, which solved the problem, now as answer so that it might be helpful for someone else with a similar issue)

            Source https://stackoverflow.com/questions/70932552

            QUESTION

            Locale messages with using i18n custom block for Vue 3 + Vuetify 3
            Asked 2022-Jan-07 at 02:31

            I want to have my locale messages separately for every component. I found an example how to do it for Vue 2, but I can't find how to do it for Vue 3 and Vuetify 3. This is what I've done:

            package.json

            ...

            ANSWER

            Answered 2022-Jan-03 at 17:52

            You need to install vue-i18n-loader as mentioned in official docs :

            You need to install vue-loader and vue-i18n-loader to use custom blocks. While vue-loader (opens new window)most likely is already used in your project if you are working with single file components, you must install vue-i18n-loader (opens new window)additionally:
            npm i --save-dev @intlify/vue-i18n-loader

            Source https://stackoverflow.com/questions/70569561

            QUESTION

            Webpack 5 HMR throws Uncaught TypeError: cannot set property of undefined at self.webpackHotUpdate
            Asked 2022-Jan-02 at 09:51

            After upgrading to Webpack 5, HMR has stopped working on our React project.

            Current versions of modules are: @webpack-cli/serve@1.5.1, html-webpack-plugin@5.3.2, webpack@5.50.0, webpack-cli@4.7.2 webpack-dev-server@4.0.0-rc.0 (note, it was failing exactly the same way with earlier non-rc version of webpack-dev-server)

            The browser console reports:

            ...

            ANSWER

            Answered 2022-Jan-02 at 09:51

            The solution was:

            Remove the CSS line from Webpack config:

            Source https://stackoverflow.com/questions/68771123

            QUESTION

            Antd Import on Demand get error: Variable @import is undefined by less-loader
            Asked 2021-Dec-01 at 03:46

            I want to config antd Import on Demand.But I get the error: Variable @import is undefined The error screenshots

            Why less parse @import as a variable?

            This is my package.json:

            ...

            ANSWER

            Answered 2021-Dec-01 at 03:46

            I found the reason. this is a antd bug, https://github.com/ant-design/ant-design/pull/32063 when i change antd version,the problem solved.

            Source https://stackoverflow.com/questions/70055854

            QUESTION

            Integrating Semantic UI with a Gatsby Project - build fails due to missing closing ')'
            Asked 2021-Nov-03 at 00:23
                failed Building development bundle - 14.691s
                ERROR in ./src/semantic/semantic.less
                Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
                ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
                
                ;(function ($, window, document, undefined) {
                                                          ^
                Missing closing ')'
            
                1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
                webpack compiled with 2 errors
            
            ...

            ANSWER

            Answered 2021-Nov-03 at 00:23

            Found a way to integrate semantic-ui without following the above linked article.

            Run: npm install semantic-ui-css --save Then import at the top level index.js page: import 'semantic-ui-css/semantic.min.css';

            How to install and use semantic-ui-react

            Source https://stackoverflow.com/questions/69790251

            QUESTION

            Adding custom Js in WebPack and using it via MVC HTML helper
            Asked 2021-Oct-22 at 13:13

            I am new to WebPack: I have an MVC 5 project using DotNet Core. My front end is all HTML and Razor with bootstrap for the css. I setup my webpackconfig.js and my site.js. All those work fine with NPM packages. When I try to add our own CDN or a local JS file I can't access the function I created. I'm posting the webpackconfig.js, the site.js, my custom.js and the html.

            I am trying to add an onchange to my EditFor. I'm not getting any errors. I'm just not sure on how I'm suppose to call that JS function.

            Webpackconfig.js

            ...

            ANSWER

            Answered 2021-Oct-21 at 13:20

            In order to access elements, which webpack bundled, you need to add them to the global window variable:

            Source https://stackoverflow.com/questions/69662711

            QUESTION

            Webpack 5 entry point now failing on imports
            Asked 2021-Oct-12 at 08:01

            I upgraded my project from webpack 4 to 5. The project runs with "webpack serve" but I get the error "SyntaxError: Cannot use import statement outside a module" in the entry point file. This used to work in webpack 4. Not sure why that now fails after trying to investigate.

            What might I be missing? I tried setting type: module in the package json but that caused more issue in webpack.config.js

            My webpack file and entry point are as such:

            ...

            ANSWER

            Answered 2021-Oct-12 at 08:01
            Issue

            I've check your configuration and found out the issue is importing a .vue file (App.vue) into your js file (index.js the entry point).

            Solution

            Basically you need babel-loader to handle transform js file in this case. Just install both babel and babel-loader:

            Source https://stackoverflow.com/questions/69412699

            QUESTION

            "Maximum call stack size exceeded" after upgrading to alpha version of antd
            Asked 2021-Sep-14 at 00:28

            Using npm I updated my antd dependency to 4.17.0-alpha.0. When I tried to run my react app after I updated it, it throws an error.

            The error:

            ...

            ANSWER

            Answered 2021-Sep-14 at 00:28

            Install new alpha release to fix it.

            Source https://stackoverflow.com/questions/69076091

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install less-loader

            To begin, you'll need to install less and less-loader:.

            Support

            Please take a moment to read our contributing guidelines if you haven't yet done so.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i less-loader

          • CLONE
          • HTTPS

            https://github.com/webpack-contrib/less-loader.git

          • CLI

            gh repo clone webpack-contrib/less-loader

          • sshUrl

            git@github.com:webpack-contrib/less-loader.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link