diff --git a/jest.config.js b/jest.config.js index d065850c827..6f7bdef2d3d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -19,7 +19,7 @@ module.exports = { */ { ...sharedConfig, - modulePathIgnorePatterns: ["v2", "data"], + modulePathIgnorePatterns: ["v2"], testRegex: ".*\\.jest\\.(ts|tsx|js|jsx)$", setupFiles: ["/test.config.js"], roots: ["/src"], diff --git a/src/v2/Apps/Purchase/routes.tsx b/src/v2/Apps/Purchase/routes.tsx index d400b436f1b..b568de3130f 100644 --- a/src/v2/Apps/Purchase/routes.tsx +++ b/src/v2/Apps/Purchase/routes.tsx @@ -2,10 +2,15 @@ import loadable from "@loadable/component" import { graphql } from "react-relay" import { RouteConfig } from "found" +const PurchasesApp = loadable(() => import("./PurchaseApp")) + export const routes: RouteConfig[] = [ { path: "/user/purchases", - getComponent: () => loadable(() => import("./PurchaseApp")), + getComponent: () => PurchasesApp, + prepare: () => { + PurchasesApp.preload() + }, query: graphql` query routes_PurchaseQuery { me {