Questions tagged [less-loader]

59 questions
2
votes
1 answer

using less-loader in webpack

I am creating a bundle.js file with webpack. I have decided I want to start using LESS as well and I have tried to add the less-loader as per the instructions: https://github.com/webpack-contrib/less-loader I ran: npm-install less-loader…
Michael
  • 8,229
  • 20
  • 61
  • 113
1
vote
0 answers

Unrecognized input on Ant design vue

While trying to run the newly created Vue 3 application with Ant design Vue (3.1.0-RC.0) framework, I'm getting unrecognized input error. Vue configurations are not at all changed. Trying to run with the default settings only. Command used to run…
1
vote
1 answer

How to add less-loader to react-app-rewired config?

I am using react-app-rewired and I want to add the less-loader to the config-overides.js but it doesn't work, I tried with module.exports = { module: { rules: [ { test: /\.less$/i, loader: [ // compiles Less to…
GisCat
  • 55
  • 2
  • 13
1
vote
0 answers

use less in html inline style

Is it possible to setup webpack, that I could use less in my html templates like: // xy.html Currently the css/less part of my webpack config looks like: { test: /\.css$/i, loader:…
elitastic
  • 11
  • 3
1
vote
0 answers

Laravel Mix "Unrecognised input" in Vue components

After upgrade webpack from verstion 3 to 5 I get error with inline load styles. ✖ Mix Compiled with some errors in 2.29s ERROR in…
1
vote
1 answer

.less files not getting picked up by less-loader

I have created a react app using create-react-app and I am using less for css. My app builds correctly, but none of the less files are loaded in build/static folder I am using customize-cra with react-app-rewired to add a loader for less…
Jatin
  • 31
  • 2
  • 5
1
vote
0 answers

How can I use LESS to personalize Ant Design Vue with nuxt?

I try to use Ant Design Vue with NUXT. I install nuxt with the commande line npm init nuxt-app And I choose Ant Design Vue. It works perfectly. But when I try to personnalize the theme (https://www.antdv.com/docs/vue/customize-theme/), it does not…
chtouk
  • 303
  • 4
  • 13
1
vote
0 answers

yarn install failed with Module parse failed: Unexpected character '@' (1:0)

I have the following configuration in my webpack.config.dev.js file const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); const path = require('path'); const webpackMerge = require('webpack-merge'); const MiniCssExtractPlugin…
1
vote
0 answers

Error: Cannot read property 'eval' of null when compiling less in webpack using webpack-spritesmith

The error is coming from the LESS file that webpack-spritesmith plugin is generating: ERROR in ./assets/less/main.less Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from…
1
vote
2 answers

Webpack css-loader UnhandledPromiseRejectionWarning: Error: The module created for a LoaderDependency must have an original source

All the plugins listed below are on the latest version. less-loader: 7.2.1 css-loader: 5.0.1 file-loader: 6.2.0 postcss-loader: 4.1.0 extract-loader: 5.1.0 autoprefixer: 10.2.1 My postcss config: module.exports = { plugins:…
Thomas L
  • 320
  • 3
  • 14
1
vote
0 answers

Importing Less from a JavaScript file into a Less file

I'm trying to import less generated through another loader from a JavaScript file. Based on less-loaders README.md it should be possible: Using webpack's resolver, you can import any file type. You just need a loader that exports valid Less code.…
Rallen
  • 2,240
  • 20
  • 22
1
vote
0 answers

vscode cannot go to file when cmd + click (@import "~path/for/index.less") in a less file

I am importing a less file and the url starting with "~", //in custom.less @import "~iview/src/styles/index.less"; I want to go to the file by cmd + click the url, but i got an error saying: Unable to open 'index.less': File not found…
James Lam
  • 145
  • 2
  • 8
1
vote
2 answers

Unable to import (require) css, less, sass file on react component when using express server

I'm importing less or css file to my react component and it is working fine on my following example project: https://github.com/digz6666/webpack-loader-test But when I use express server to implement SSR I no longer can import less file to my react…
digz6666
  • 1,798
  • 1
  • 27
  • 37
1
vote
1 answer

stylelint throws at-rule-* errors when parsing LESS variables

I'm using stylelintas a postcss plugin in my webpack config. Further up the chain (so being executed after the postcss-loader), I'm also using less-loader. All dependencies are used in their most current…
Constantin Groß
  • 10,719
  • 4
  • 24
  • 50
1
vote
0 answers

px unit for flex-basis value gets truncated after webpack build

I have the following code in my less file: flex: 1 0 0px I should put 'px' unit for flex-basis due to its bug in Internet Explorer. However, after webpack build, 'px' unit gets truncated. The css output has the following line: flex: 1 0 0 Is there…
sam
  • 2,780
  • 1
  • 17
  • 30