open-index/open-npm huggingface dataset:
npm package: @swwind/remove-exports
Description: A SWC plugin for removing named exports and related imports from a module.
Author: swwind
Latest version: 2.1.3

# @swwind/remove-exports

A SWC plugin for removing named exports and related imports from a module.

## Example

Before

```js
import { deps } from "./deps.ts";
export const foo = deps();
export const bar = 2333;
```

After removing `foo`.

```js
export const bar = 2333;
```

## Usage

```ts
import removeExports from "@swwind/remove-exports";

interface PluginOptions {
  // export names to remove
  removes?: string[];
}

jsc: {
  // ...
  experimental: {
    plugins: [
      removeExports(options),
    ];
  }
}
```

Note: this plugin does not support use module name directly.
npm package: @swwind/treeshake-events
Description: Remove specific properties from generated jsx function calls.
Author: swwind
Latest version: 2.1.3

# @swwind/treeshake-events

Remove specific properties from generated jsx function calls.

Before

```js
import { jsx as _jsx } from "preact/jsx-runtime";

_jsx("div", { id: "app", onClick: () => alert(2333) });
```

After

```js
import { jsx as _jsx } from "preact/jsx-runtime";

_jsx("div", { id: "app" });
```

Note: the treeshake only works when

1. `jsx` function must use import statement and listed in `options.jsxs`
2. `jsx` function can be renamed to other idents (doesn't matter our trackings)
3. first argument of `jsx` is string literal and second is object literal.
4. property name must be ident or string (no `{ ["onClick"]: () => {} }` please)

If all the conditions are true, a treeshake of that property will be performed.

# Usage

```ts
import treeshakeEvents from "@swwind/treeshake-events";

interface PluginOptions {
  // jsx function names
  jsxs?: string[]; // defaults ['jsx', 'jsxs', 'jsxDEV']
  // event properties regex
  matches?: string[]; // defaults ['^on[A-Z]']
}

jsc: {
  // ...
  experimental: {
    plugins: [
      treeshakeEvents(options),
    ];
  }
}
```

Note: this plugin does not support use module name directly.