Skip to main content

Minimizing bundle size

The top-level found package exports everything available in this library. It is unlikely that any single application will use all the features available. As such, for real applications, you should import the modules you need directly, to pull in only the code that you use.

import createBrowserRouter from "found/createBrowserRouter";
import makeRouteConfig from "found/makeRouteConfig";
import Route from "found/Route";

// Instead of:
// import {
// createBrowserRouter,
// makeRouteConfig,
// Route,
// routerShape,
// } from 'found';