We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deedef4 commit 7be1f9bCopy full SHA for 7be1f9b
frontend/src/instrumentation.ts
@@ -1,11 +1,12 @@
1
-import fs from "fs";
+export async function register() {
2
+ if (
3
+ process.env.NEXT_RUNTIME === "nodejs" &&
4
+ process.env.NEXT_MANUAL_SIG_HANDLE
5
+ ) {
6
+ const fs = await import("fs");
7
-export function register() {
- if (process.env.NEXT_RUNTIME === "nodejs") {
- if (process.env.NEXT_MANUAL_SIG_HANDLE) {
- process.on("SIGTERM", () => {
- fs.writeFileSync("/tmp/shutdown", "1");
8
- });
9
- }
+ process.on("SIGTERM", () => {
+ fs.writeFileSync("/tmp/shutdown", "1");
10
+ });
11
}
12
0 commit comments