# All files / src/webpack/inc babel-server-rule.js

100% Statements 6/6
50% Branches 2/4
100% Functions 1/1
100% Lines 5/5

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
    262x
    2x

    2x
    2x

    6x

     let presetEnv = require("@babel/preset-env");
    presetEnv = presetEnv.default ? presetEnv.default: presetEnv;

    let presetReact = require("@babel/preset-react");
    presetReact = presetReact.default ? presetReact.default: presetReact;

    module.exports = module.exports.default = (options) => ({
      test: /\.jsx?$/,
      use: {
        loader: "babel-loader",
        options: {
          presets: [
            [
              presetEnv,
              {
                "targets": { "node": "8.11.2" }
              }
            ],
            presetReact,
          ],
          cacheDirectory: options.cacheDirectory,
          plugins: require("./babel-plugins")(options)
        }
      }
    });