From 3133ed6106f60158f9bac0e5b120b1ab58e0328f Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 3 Sep 2022 18:21:55 +0100 Subject: [PATCH] docs(gotcha): Fix fs-extra re-export sample (#4125) --- docs/pages/gotchas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/gotchas.md b/docs/pages/gotchas.md index 2e93ee9da14..e98b68c447c 100644 --- a/docs/pages/gotchas.md +++ b/docs/pages/gotchas.md @@ -34,7 +34,7 @@ export default function SomeRoute() { To fix it, move the import into a different module named `*.server.js` or `*.server.ts` and import from there. In our example here, we create a new file at `utils/fs-extra.server.js`: ```js filename=app/utils/fs-extra.server.js -export * from "fs-extra"; +export { default } from "fs-extra"; ``` And then change our import in the route to the new "wrapper" module: @@ -42,7 +42,7 @@ And then change our import in the route to the new "wrapper" module: ```jsx filename=app/routes/index.jsx lines=[3] import { json } from "@remix-run/node"; // or cloudflare/deno -import fs from "../utils/fs-extra.server"; +import fs from "~/utils/fs-extra.server"; export async function loader() { return json(await fs.pathExists("../some/path"));