Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Not work with .less to .css #1

@chioio

Description

@chioio

Plugin not work with .less to .css ext.
build.js

import * as esbuild from 'esbuild'

import clean from 'esbuild-plugin-clean'
import dts from 'esbuild-plugin-d.ts'
import { lessLoader } from 'esbuild-plugin-less'
import { transformExtPlugin } from '@gjsify/esbuild-plugin-transform-ext'

await esbuild.build({
  entryPoints: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.less'],
  format: 'esm',
  outdir: 'dist',
  tsconfig: 'tsconfig.json',
  bundle: false,
  plugins: [
    clean(),
    dts(),
    lessLoader({ filename: '' }),
    transformExtPlugin({ outExtension: { '.less': '.css' } }),
  ],
})

output.js

import "./Button.less";
import { Button } from "./Button";
var Button_default = Button;
export {
  Button_default as default
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions