esbuild-style-plugin icon indicating copy to clipboard operation
esbuild-style-plugin copied to clipboard

[bug] Package `Stylus` to generate additional JavaScript files

Open RSS1102 opened this issue 1 year ago • 0 comments

esbuild.config:

import * as esbuild from 'esbuild';
import stylePlugin from 'esbuild-style-plugin'

esbuild.build({
    bundle: true,
    outdir: './dist',
    entryPoints: ['./src/lib/index.styl'],
    entryNames: "nanarinostyl.min",
    minify: true,
    plugins: [
        stylePlugin()
    ],
}).then((res) => {
    console.log('Build complete', res);
}).catch((e) => {
    console.log('Errors', e);
});

When I was packaging Stylus, he generated an additional JavaScript file:index.js image

But there's only this one in the code, and I'm not sure if it's an issue with esbuild or something else.

(()=>{})();

reproduced : https://github.com/RSS1102/nanarinostyl/tree/min.css

RSS1102 avatar Feb 07 '24 21:02 RSS1102