question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to resolve .less files ?

See original GitHub issue

I’m using tsup in a component package in my monorepo. This component package requires less support and I’m unable to use less files in this

[ERROR] No loader is configured for ".less" files: src/atoms/ZSelect/index.module.less
error TS6054: File '/packages/ui/src/atoms/ZSelect/index.module.less' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'.
  The file is in the program because:
    Root file specified for compilation

How can I add less loader in config?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Manonicucommented, Jun 10, 2022

pls support “.less,scss” etc files

0reactions
jeffreys-catcommented, Sep 21, 2022

you can use https://www.npmjs.com/package/esbuild-plugin-less

import { defineConfig } from 'tsup';
import { lessLoader } from 'esbuild-plugin-less';

export default defineConfig({
    esbuildPlugins: [lessLoader()],
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

less-loader | webpack - JS.ORG
First we try to use built-in less resolve logic, then webpack resolve logic. Webpack Resolver. webpack provides an advanced mechanism to resolve files....
Read more >
Command Line Usage - Less CSS
Compile .less files to .css using the command line. Heads up! If the command line isn't your thing, learn more about GUIs for...
Read more >
Webpack and LESS. How to make them play along nicely
First, the less-loader is run. This passes the content of the file on to the LESS compiler, which then returns compiled CSS. Second,...
Read more >
Can I watch less files change and convert it to css files by ...
In my project, I want to watch all my *.less file change, and convert it to *.css . I used gulp to do...
Read more >
Less - Parcel
Compiled Less files are also processed the same way as CSS, which means it is compiled for your browser targets, and any PostCSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found