# All files / src/webpack/inc babel-plugins.js

100% Statements 20/20
57.14% Branches 12/21
100% Functions 1/1
100% Lines 19/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    482x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    2x
    2x

    10x

     let reactLoadableRoutes = require("../plugins/react-loadable-routes");
    reactLoadableRoutes = reactLoadableRoutes.default ? reactLoadableRoutes.default : reactLoadableRoutes;

    let dynamicImportWebpack = require("../plugins/dynamic-import-webpack");
    dynamicImportWebpack = dynamicImportWebpack.default ? dynamicImportWebpack.default: dynamicImportWebpack;

    let syntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
    syntaxDynamicImport = syntaxDynamicImport.default ? syntaxDynamicImport.default: syntaxDynamicImport;

    let objectRestSpread = require("@babel/plugin-proposal-object-rest-spread");
    objectRestSpread = objectRestSpread.default ? objectRestSpread.default: objectRestSpread;

    let decorators = require("@babel/plugin-proposal-decorators");
    decorators = decorators.default ? decorators.default: decorators;

    let classProperties = require("@babel/plugin-proposal-class-properties");
    classProperties = classProperties.default ? classProperties.default: classProperties;

    let generatorFunctions = require("@babel/plugin-proposal-async-generator-functions");
    generatorFunctions = generatorFunctions.default? generatorFunctions.default : generatorFunctions;

    let lodash = require("babel-plugin-lodash");
    lodash = lodash.default ? lodash.default: lodash;

    let reactHotLoader = require("react-hot-loader/babel");
    reactHotLoader = reactHotLoader.default? reactHotLoader.default: reactHotLoader;

    module.exports = module.exports.default =  (options = {noChunk: false}) => [
      reactLoadableRoutes,
      options.noChunk ? dynamicImportWebpack: syntaxDynamicImport,
      objectRestSpread,
      [
        decorators,
        {
          "legacy": true
        }
      ],
      [
        classProperties,
        {
          "loose": true
        }
      ],
      generatorFunctions,
      lodash,
      reactHotLoader,
    ];