Replies: 1 comment
-
I managed to get this to work by generating a jsconfig.json in the next project dir like this:
For me, my inputs are all already compiled javascript, so this should work fine. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having some trouble making next.js work under rules_js. The specific problem I am having trouble with is that next.js opens tsconfig.json in read-write mode, and Bazel (understandably) does not want the actions to an input to be in read-write mode. Thus, the node runtime crashes with an error.
My understanding is that tsconfig.json is a useful thing for next.js to have available in general, but more specifically, module resolution within my monorepo won't work without it because it uses absolute paths and baseUrl is needed for those. As a result, I'm attempting to pass the tsconfig.json in the project root to my next.js build action. It's important to note that next.js will not modify tsconfig.json within this run. It has no need to.
I've tried and considered a few approaches:
tsconfigPath
, and next.js does not seem to have ajsconfigPath
equivalent.I'd like to hear if anyone has any thoughts as to a way forward here. I feel like it could be possible to have some kind of harness that allows "opening" read-only files as read-write, but fails only when an attempt at a write actually occurs.
The pull request I am working on is here: https://github.com/Zemnmez/monorepo/pull/2091/files
Beta Was this translation helpful? Give feedback.
All reactions