2.1.3 • Published 1 year ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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.3

1 year ago

2.1.2

2 years ago

2.1.1

2 years ago