Package Exports
- babel-plugin-transform-mangle
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-transform-mangle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-plugin-transform-mangle
Mangle Identifiers that can be shortened
Install
npm install babel-plugin-transform-mangle --save-dev
Example
In :
import MyAwesomeLib from 'my-awesome-lib';
const ReallyLongName = "1";
class BlahBlahBlahBlah {
method() {}
}
function doSomethingWithAReallyLongName() {
var localVariable, someIdentifier;
}
Out :
import a from 'my-awesome-lib';
const b = "1";
class c {
method() {}
}
function d() {
var a, b;
}
Options
keep_fnames
: [Default: false] Don't mangle function names for FunctionExpressions and FunctionDeclarations - Useful for code depending onfn.name
.mangle_globals
: [Default: false] Mangle variables in the outermost scope.