@linjiajian999/esbuild-plugin-import
v1.0.2
Published
Modularly import plugin for esbuild.
Downloads
4,065
Maintainers
Readme
esbuild-plugin-import
Modularly import plugin for esbuild.
inspired by ant-design/babel-plugin-import
Example
import { Button } from 'antd';
// 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 //
import 'antd/lib/button/style/css';
import Button from 'antd/lib/button';
Usage
npm install @linjiajian999/esbuild-plugin-import
config
options
export interface EsbuildPluginImportOption {
libraryName: string;
/**
* @default 'lib'
*/
libraryDirectory?: string;
style?:
| 'css'
| boolean
| ((importName: string, importPath: string) => string);
styleLibraryDirectory?: string;
customStyleName?: string;
/**
* @default true
*/
camel2DashComponentName?: boolean;
camel2UnderlineComponentName?: boolean;
/**
* @default true
*/
transformToDefaultImport?: boolean;
ignoreImports?: (RegExp | string)[];
}
libraryName
todo
Contributors
This project exists thanks to all the people who contribute.
contributors