# @rosmarinus/babel-plugin-tree-cutting

> a babel plugin to make project tree shaking possible

Latest version **2.1.3** (published 2024-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rosmarinus/babel-plugin-tree-cutting
pnpm add @rosmarinus/babel-plugin-tree-cutting
yarn add @rosmarinus/babel-plugin-tree-cutting
bun add @rosmarinus/babel-plugin-tree-cutting
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2024-05-26 |
| First published | 2023-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | rosmarinus |
| Keywords | utils, rosmarinus |

## Links

- npm: https://www.npmjs.com/package/@rosmarinus/babel-plugin-tree-cutting
- Repository: https://github.com/rosmarinus-project/rosmarinus-universal
- Homepage: https://github.com/rosmarinus-project/rosmarinus-universal#readme
- Issues: https://github.com/rosmarinus-project/rosmarinus-universal/issues
- npm.io page: https://npm.io/package/@rosmarinus/babel-plugin-tree-cutting

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.23.3

## Recent versions

- 2.1.3 (latest) — 2024-05-26
- 2.1.2 — 2023-11-13
- 2.1.1 — 2023-11-10

## README

# @rosmarinus/babel-plugin-tree-cutting

<p align="center">
  <a href="https://www.npmjs.com/package/@rosmarinus/babel-plugin-tree-cutting"><img src="https://img.shields.io/npm/v/@rosmarinus/babel-plugin-tree-cutting" alt="npm package"></a>
  <a href="https://github.com/rosmarinus-project/rosmarinus-universal/actions/workflows/publish.yml"><img src="https://github.com/rosmarinus-project/rosmarinus-universal/actions/workflows/publish.yml/badge.svg" alt="build status"></a>
  <a href="https://pr.new/rosmarinus-project/rosmarinus-universal"><img src="https://developer.stackblitz.com/img/start_pr_dark_small.svg" alt="Start new PR in StackBlitz Codeflow"></a>
</p>

This npm is used to transform the import code to import from the correct sub path.

Always use with @rosmarinus/import-map-generator.

For examples:
```typescript
import { foo } from 'npm'

// will be transformed to
import { foo } from 'npm/foo'
```

# How to Install

```bash
npm i @rosmarinus/babel-plugin-tree-cutting
```

# How to Use

```js
// babel.config.js
module.exports = {
  plugins: [
    [
      '@rosmarinus/babel-plugin-tree-cutting',
      {
        npmName: 'your npm name',
        exportMapPath: 'the path of @rosmarinus/import-map-generator output'
      }
    ],
  ]
}

---
_Source: https://npm.io/package/@rosmarinus/babel-plugin-tree-cutting · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
