2.1.2 • Published 6 months ago
@rosmarinus/babel-plugin-tree-cutting v2.1.2
@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'
}
],
]
}