diff --git a/crates/next-core/js/package.json b/crates/next-core/js/package.json index 413a1db471a1b4..b5431921f70d99 100644 --- a/crates/next-core/js/package.json +++ b/crates/next-core/js/package.json @@ -5,6 +5,7 @@ "license": "UNLICENSED", "private": true, "scripts": { + "build": "pnpm check", "check": "tsc --noEmit" } } diff --git a/crates/next-core/js/src/entry/page-loader.ts b/crates/next-core/js/src/entry/page-loader.ts index 3e472de785a232..10b8cf8c86f6c3 100644 --- a/crates/next-core/js/src/entry/page-loader.ts +++ b/crates/next-core/js/src/entry/page-loader.ts @@ -8,7 +8,9 @@ declare const PAGE_PATH: string return require('PAGE') }, ]) +// @ts-expect-error module.hot exists if (module.hot) { + // @ts-expect-error module.hot exists module.hot.dispose(function () { window.__NEXT_P.push([PAGE_PATH]) }) diff --git a/crates/next-core/js/tsconfig.json b/crates/next-core/js/tsconfig.json index f7c18306acf89d..803f5c600d0ba3 100644 --- a/crates/next-core/js/tsconfig.json +++ b/crates/next-core/js/tsconfig.json @@ -26,7 +26,6 @@ "@vercel/turbopack-next/internal/_error": ["node_modules/next/error"] }, "resolveJsonModule": true, - "types": ["react/next"], // emit "noEmit": true, "stripInternal": true