🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@linjiajian999/esbuild-plugin-import

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@linjiajian999/esbuild-plugin-import

Modularly import plugin for esbuild.

1.0.2
latest
Source
npm
Version published
Weekly downloads
963
24.9%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

esbuild

FAQs

Package last updated on 15 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts