housekeeping: upgrade to babel@7 (via #5450)

* Babel 7

* preserve module output; straighten out ES/CJS syntax

* add webpack TODOs

* remove unused Babel modules

* Update index.js

* install @babel/register
This commit is contained in:
kyle
2019-07-09 23:25:34 -05:00
committed by GitHub
parent 835d135049
commit 9935ea3328
8 changed files with 2125 additions and 403 deletions

View File

@@ -1,11 +1,15 @@
import deepExtend from "deep-extend"
// This file uses CommonJS require/exports syntax in order to export the SwaggerUI
// function directly, instead of `{ default: fn SwaggerUI }`, which Babel would
// generate if we used ESM syntax.
import System from "core/system"
import win from "core/window"
import ApisPreset from "core/presets/apis"
const deepExtend = require("deep-extend")
const System = require("core/system").default
const ApisPreset = require("core/presets/apis").default
const AllPlugins = require("core/plugins/all").default
const { parseSearch } = require("core/utils")
const win = require("core/window")
import * as AllPlugins from "core/plugins/all"
import { parseSearch } from "core/utils"
if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
win.Perf = require("react-dom/lib/ReactPerf")