esbuild-style-plugin
esbuild-style-plugin copied to clipboard
How to modify the output path?
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 />