@rosmarinus/babel-plugin-tree-cutting
v2.1.3
Published
a babel plugin to make project tree shaking possible
Downloads
1
Readme
@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'
}
],
]
}