Prerendered bulid with NX problems #1246
Unanswered
aldrio
asked this question in
Help & Questions
Replies: 2 comments 2 replies
-
👍 What exactly are these changes you made? (Feel free to publish your changes as a PR.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I also had problems with launching prerendering in nx environment and this issue helped me to solve it where I accidentally found the existence of disableAutoFullBuild option. @brillout you should definitely add the description of disableAutoFullBuild to docs. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i'm trying to get SSG working in my NX based project. When I build my webapp from the command line with vite directly vike works fine, however I'm having trouble getting the build with prerendering to work using the nx executor.
I've found I have to add
disableAutoFullBuild: false
to the config it gets to the prerendering step, but then it still crashes withError: Cannot find module '../assets.json'
I traced the issue to here:
vike/vike/node/plugin/plugins/autoFullBuild.ts
Lines 70 to 78 in 4ce0c18
The options passed to vite build from the nx executor, including options about the correct output build path, aren't correctly passed through because the code is only passing options if it was a command line call. Locally i made a patch to change that selection to be
const configInline = config.inlineConfig;
So I guess I'm wondering if that makes sense or would have any problems? I'm not very familiar with vite I just happened to see inlineConfig when checking stuff out and it seems to work. I'm assuming either config.inlineConfig didn't exist at the time this was written or there's a reason for not using itBeta Was this translation helpful? Give feedback.
All reactions