@swwind/remove-exports
v2.1.3
Published
A SWC plugin for removing named exports and related imports from a module.
Downloads
5
Readme
@swwind/remove-exports
A SWC plugin for removing named exports and related imports from a module.
Example
Before
import { deps } from "./deps.ts";
export const foo = deps();
export const bar = 2333;
After removing foo
.
export const bar = 2333;
Usage
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.