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

How to modify the output path?

Open takegine opened this issue 2 years ago • 0 comments

I want to a/index.tsx output to dist/scripts/a.Js and a/index.less output to dist/styles/a.css, I tried outdir: 'dist',entryNames: 'scripts/[dir]' , but the css directory is wrong.

├── src
│   └── a
│       ├── index.html
│       ├── index.tsx
│       └── index.less
├── dist
│   ├── layout
│       └── a.html
│   ├── scripts
│       └── a.js
│   ├── styles
│       └── a.css

If it needs a plugin to run, how should I write it?

a/index.less is import in a/index.tsx, like this:

// a/index.tsx
import React from 'react';
import './index.less';
export default ()=><div />

takegine avatar Nov 19 '22 10:11 takegine