mrbuilder-plugin-babel-7

3.3.1 • Public • Published

This plugin provides babel 7 support to mrbuilder. It allows for configuration via .babelrc or via normal mrbuilder configuration methods. It also provides support for babel to webpack via babel-loader

If your upgrading from babel 6 and have a custom .babelrc try running babel-upgrade to convert your .babelrc. If your using mrbuilders defaults it should "just work".

The default babel configuration:

{
  "presets": [
    "@babel/preset-env",
    "@babel/preset-react"
  ],
  "plugins": [
    "mrbuilder-plugin-babel/react-class-display-name",
    "@babel/plugin-proposal-function-bind",
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-transform-async-to-generator",
    [
      "@babel/plugin-proposal-export-default-from",
      "@babel/plugin-proposal-export-namespace-from"
    ],
    "@babel/plugin-transform-runtime",
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-proposal-json-strings",
    [
      "@babel/plugin-proposal-decorators",
      {
        "legacy": true
      }
    ],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions"
  ]
}
 
Property Type Default Description
hot bool false Turns hot loading supoprt for hmr usually automatically
test regex /.jsx?$/ Webpack module test to transpile
includes arrayOf: string,regex ./src,./public,./test Webpack module includes option
use object {use:{loader:'babel-loader}} Allows for a different babel-loader
<babel_plugin> object configure babel plugins

Readme

Keywords

none

Package Sidebar

Install

npm i mrbuilder-plugin-babel-7

Weekly Downloads

0

Version

3.3.1

License

0BSD

Unpacked Size

10.2 kB

Total Files

8

Last publish

Collaborators

  • nanandn
  • speajus