The issue is like https://github.com/vercel/next.js/issues/8158
I’m tried to generate a static site with Next js v9.0.2 and got assets linking by default to /_next/static/something/something.js. But by default build and export create a folder .next.
There is no solution at all, if people came up with
module.exports = {
assetPrefix: ".",
};
That’s even more strange. This problem will occur if people don’t add the above settings without changing anything after installation. This shouldn’t happen.
In addition, even if the above settings are used, an error will still be reported and the build cannot be completed at all.
Failed to compile.
srcapplayout.js
`next/font` error:
assetPrefix must start with a leading slash or be an absolute URL(https:// or https://)
Many people on the Internet use the manual replace method. I believe this is not a good method, just like automatically completing the build and then manually modifying it.