From 82cd60b03601b29dcc8e4108f7cd47ae6dadfed4 Mon Sep 17 00:00:00 2001 From: mjmiguel Date: Thu, 3 Sep 2020 10:47:47 -0700 Subject: [PATCH] revert dynamic imports --- .babelrc | 3 +-- package.json | 2 -- .../components/composer/NewRequest/ComposerNewRequest.jsx | 8 ++------ src/client/components/containers/ContentsContainer.tsx | 6 +----- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.babelrc b/.babelrc index 99bcae509..7b6f1cd25 100644 --- a/.babelrc +++ b/.babelrc @@ -12,7 +12,6 @@ "plugins": [ ["@babel/transform-runtime"], ["@babel/proposal-class-properties"], - ["@babel/proposal-object-rest-spread"], - ["@babel/plugin-syntax-dynamic-import"] + ["@babel/proposal-object-rest-spread"] ] } diff --git a/package.json b/package.json index 33c3f98d7..fc96ef247 100644 --- a/package.json +++ b/package.json @@ -302,13 +302,11 @@ "@babel/core": "^7.10.3", "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-object-rest-spread": "^7.10.4", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-runtime": "^7.10.3", "@babel/preset-env": "^7.10.3", "@babel/preset-react": "^7.10.1", "@babel/preset-typescript": "^7.10.4", "@jest-runner/electron": "^3.0.0", - "@loadable/component": "^5.13.1", "@testing-library/jest-dom": "^5.11.0", "@testing-library/react": "^10.4.3", "@types/cookie": "^0.4.0", diff --git a/src/client/components/composer/NewRequest/ComposerNewRequest.jsx b/src/client/components/composer/NewRequest/ComposerNewRequest.jsx index 489dab2a0..0b340ffda 100644 --- a/src/client/components/composer/NewRequest/ComposerNewRequest.jsx +++ b/src/client/components/composer/NewRequest/ComposerNewRequest.jsx @@ -1,8 +1,6 @@ import React from "react"; import uuid from "uuid/v4"; // (Universally Unique Identifier)--generates a unique ID import gql from "graphql-tag"; -import loadable from "@loadable/component"; - import HeaderEntryForm from "./HeaderEntryForm.jsx"; import BodyEntryForm from "./BodyEntryForm.jsx"; import GRPCProtoEntryForm from "./GRPCProtoEntryForm.jsx"; @@ -10,10 +8,8 @@ import FieldEntryForm from "./FieldEntryForm.jsx"; import CookieEntryForm from "./CookieEntryForm.jsx"; import historyController from "../../../controllers/historyController"; import GraphQLIntrospectionLog from "./GraphQLIntrospectionLog"; - -// lazy loading to reduce bundle size (codemirror) -const GraphQLBodyEntryForm = loadable(() => import('./GraphQLBodyEntryForm')); -const GraphQLVariableEntryForm = loadable(() => import('./GraphQLVariableEntryForm')); +import GraphQLBodyEntryForm from "./GraphQLBodyEntryForm"; +import GraphQLVariableEntryForm from "./GraphQLVariableEntryForm"; const ComposerNewRequest = ({ diff --git a/src/client/components/containers/ContentsContainer.tsx b/src/client/components/containers/ContentsContainer.tsx index 1a0be3399..47e18334e 100644 --- a/src/client/components/containers/ContentsContainer.tsx +++ b/src/client/components/containers/ContentsContainer.tsx @@ -1,9 +1,5 @@ import * as React from "react"; -import loadable from "@loadable/component"; - -// lazy loading to reduce bundle size (chart.js) -const BarGraph = loadable(() => import('../display/BarGraph')) - +import BarGraph from "../display/BarGraph" import ReqResContainer from "./ReqResContainer.jsx"; import NavBarContainer from "./NavBarContainer.jsx";