Cross compile next.js app for different architecture
Unanswered
Florida White posted this in #help-forum
Florida WhiteOP
I can use --cpu and --os flags of npm https://docs.npmjs.com/cli/v9/commands/npm-install#cpu to download and install packages for a different architecture. Are there similar flags so that I can do a "next build --cpu ... --os ...." and build a standalone output for a different architecture? This would save dramatically time spent in emulation in CI/CD
2 Replies
This is for the node modules right? As you prob could try to copy the assets you want manually
Florida WhiteOP
As far as I understand, during next build phase some platform-dependent items are built. Is there a way to have this built for a platform that is not the one where I run "next build" (i.e. arm64 vs amd64)? What I should copy manually? From where?