2.1.2 • Published 6 months ago

@rosmarinus/babel-plugin-tree-cutting v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@rosmarinus/babel-plugin-tree-cutting

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:

import { foo } from 'npm'

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

How to Install

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

How to Use

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

6 months ago

2.1.1

6 months ago