3.3.1 • Published 5 years ago

mrbuilder-plugin-babel-7 v3.3.1

Weekly downloads
1
License
0BSD
Repository
-
Last release
5 years ago

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"
  ]
}
PropertyTypeDefaultDescription
hotboolfalseTurns hot loading supoprt for hmr usually automatically
testregex/.jsx?$/Webpack module test to transpile
includesarrayOf: string,regex./src,./public,./testWebpack module includes option
useobject{use:{loader:'babel-loader}}Allows for a different babel-loader
<babel_plugin>objectconfigure babel plugins