Skip to content

Commit

Permalink
fix: ts types for nextjs 2nd try
Browse files Browse the repository at this point in the history
  • Loading branch information
thomvaill committed Dec 16, 2024
1 parent c9c77f7 commit 056a1a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/web/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
});
5 changes: 3 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 056a1a4

Please sign in to comment.