diff --git a/packages/web/nextjs/next.config.js b/packages/web/nextjs/next.config.js index 8d70a40..c04ef12 100644 --- a/packages/web/nextjs/next.config.js +++ b/packages/web/nextjs/next.config.js @@ -48,7 +48,8 @@ module.exports = withBundleAnalyzer({ typescript: { // We check typescript errors only during the first build, not during "log4brains build", // for performance purpose and to avoid importing @types/* packages as dependencies - // #NEXTJS-HACK Exception: @types/node is required because of the Next.js verifyTypeScriptSetup() pre-checks + // #NEXTJS-HACK Exception: typescript, @types/react and @types/node are required because of the Next.js verifyTypeScriptSetup() pre-checks + // TODO: in the future, try to compile the Next.js app to JS during the build phase to avoid depending on typescript dependencies at the runtime ignoreBuildErrors: process.env.LOG4BRAINS_PHASE !== "initial-build" } }); diff --git a/packages/web/package.json b/packages/web/package.json index 2e9e311..8e9568c 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -53,6 +53,7 @@ "@material-ui/lab": "^4.0.0-alpha.56", "@next/bundle-analyzer": "^10.0.1", "@types/node": "^15.0.1", + "@types/react": "^17.0.0", "babel-plugin-import": "^1.13.1", "badge-maker": "^3.3.0", "chalk": "^4.1.0", @@ -71,7 +72,8 @@ "react-icons": "^3.11.0", "slugify": "^1.4.5", "socket.io": "^2.3.0", - "socket.io-client": "^2.3.1" + "socket.io-client": "^2.3.1", + "typescript": "^4.0.3" }, "devDependencies": { "@babel/core": "^7.11.6", @@ -81,7 +83,6 @@ "@storybook/react": "^6.1.9", "@types/lunr": "^2.3.3", "@types/mkdirp": "^1.0.1", - "@types/react": "^17.0.0", "@types/react-test-renderer": "^16.9.3", "@types/signale": "^1.4.1", "@types/socket.io": "^2.1.11",