Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Move fs to dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem committed Jul 24, 2024
1 parent a61918f commit 72ef091
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "r2r-js",
"version": "1.2.10",
"version": "1.2.11",
"description": "",
"main": "dist/index.js",
"browser": "dist/index.browser.js",
Expand Down
4 changes: 3 additions & 1 deletion src/r2rClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { URLSearchParams } from "url";

let fs: any;
if (typeof window === "undefined") {
fs = require("fs");
import("fs").then((module) => {
fs = module;
});
}

import { feature, initializeTelemetry } from "./feature";
Expand Down

0 comments on commit 72ef091

Please sign in to comment.