babel-preset-manpacker

1.10.0 • Public • Published

npm npm bundle size npm NPM

nodei.co

Explain

Manpacker preset based on babel7 encapsulation.
The following plug-ins are used:
"@babel/plugin-proposal-class-properties".
"@babel/plugin-proposal-decorators".
"@babel/plugin-syntax-dynamic-import".
"@babel/polyfill".
"babel-plugin-dynamic-import-node".

Babel presets polyfill default config:

{"useBuiltIns": "usage", corejs: 3}

Configuration items can be referenced: @babel/preset-env

There are two attributes outside:

key value explain
decoratorsLegacy true plugin:"decorators"
propertiesLoose true plugin:"properties"

Install

npm install babel-preset-manpacker -D

Usage

  • Add  .babelrc   file to your project.  

Configuration content of file.

{
  "presets": ["manpacker"]
}
  • You can add a configuration entry to the package.json file as follows.
"babel": {
  "presets": ["manpacker"]
}

Refer to the following configuration.
Example:

"babel": {
  "presets": [
    ["manpacker", {"useBuiltIns": "entry"}]
  ]
}

Ingress files need to be manually introduced

import "@babel/polyfill"

Npm

link

Package Sidebar

Install

npm i babel-preset-manpacker

Weekly Downloads

4

Version

1.10.0

License

MIT

Unpacked Size

4.93 kB

Total Files

6

Last publish

Collaborators

  • winterfete