How to use the react-hot-loader/babel.default function in react-hot-loader

To help you get started, we’ve selected a few react-hot-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Atyantik / pawjs / src / webpack / inc / babel-plugins.js View on Github external
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;

const defaults = {noChunk: false, hot: true};
module.exports = module.exports.default =  (options = {noChunk: false, hot: true}) => {
  options = Object.assign({}, defaults, options);
  return [
    reactLoadableRoutes,
    options.noChunk ? dynamicImportWebpack: syntaxDynamicImport,
    objectRestSpread,
    [
      decorators,
      {
        "legacy": true
      }
    ],
    [
      classProperties,