Skip to content

Commit

Permalink
6268/next typescript config error (#6269)
Browse files Browse the repository at this point in the history
* add typescript ignoreBuildErrors flag

* changeset
  • Loading branch information
gwyneplaine authored Aug 6, 2021
1 parent 94435ff commit 697efa3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-lobsters-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': patch
---

Added ignoreBuildErrors flag to next-config.js file, to negate false positive errors in keystone builds with imported components.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import Path from 'path';
import withPreconstruct from '@preconstruct/next';

export const config = withPreconstruct({
typescript: {
ignoreBuildErrors: true,
},
webpack(config: any, { isServer }: any) {
config.resolve.alias = {
...config.resolve.alias,
Expand Down
2 changes: 1 addition & 1 deletion packages/keystone/src/scripts/tests/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test('build works with typescript without the user defining a babel config', asy
✨ Generating Keystone config code
✨ Building Admin UI
info - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
info - Checking validity of types...
info - Skipping validation of types...
info - Creating an optimized production build...
info - Compiled successfully
info - Collecting page data...
Expand Down

1 comment on commit 697efa3

@vercel
Copy link

@vercel vercel bot commented on 697efa3 Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.