keystone
keystone copied to clipboard
keystone build command: Impossible to bundle all files using custom esbuild config
Steps to reproduce:
- initialize keystone project
- add esbuild.keystone.ts file to enable custom esbuild
- inside esbuild.keystone.ts remove default plugins configuration to bundle all the dependencies
Expected:
it builds the project
Context:
Minimal repository: https://github.com/kamilbiela/keystone-graphql-issue
Custom esbuild file: https://github.com/kamilbiela/keystone-graphql-issue/blob/main/esbuild.keystone.ts
Github runner action output: https://github.com/kamilbiela/keystone-graphql-issue/actions/runs/11610130875/job/32328818149
Am I doing something wrong here? I really would like to bundle all the dependencies because my original setup uses a mono repo, and this would greatly simplify the whole build and deploy pipeline.
Thank you for the help :)
@kamilbiela can you describe what happens for you?
@dcousens hey, this:
(it's from the "Github runner action output link")
Digging deeper (https://github.com/howtographql/react-apollo/issues/33#issuecomment-426096917) I did set export NODE_ENV="production" and it makes this error go away.
Now there is this:
Note: this is building against boilerplate code without any modification
After removing all "relationship" fields there is different error:
And after leaving only User list and setting all of the fields to isOrderable: false there is this error:
@kamilbiela please verify that you only have 1 version of graphql installed/resolving
I'm giving errors from a repository initialized with npm create keystone-app@latest where the only change is that I want to package all deps with esbuild.
I did set up GitHub Runner with this minimal repository, and it replicates my local issue of not being able to package all dependencies with the esbuild. All the links are in the original description.
This is latest run: https://github.com/kamilbiela/keystone-graphql-issue/actions/runs/11660520546/job/32463003633
I don't understand why the label bug was removed. Thanks for the help :)
Adding this also didn't change the outcome:
to summarize the build problem.
With NODE_ENV=production the graphql error goes away.
But it does make another problem appear (this is with the example keystone code):