是否可以仅对 <head></head>
数据进行服务器端渲染?我正在尝试使用 next.js 之类的功能:
export async function getServerSideProps(context) {
return {
props: {}, // will be passed to the page component as props
}
}
因此,在 express 服务器中,它将捕获导出的函数 getServerSideProps 并在 <head>
标记中设置数据。我不想要 next.js 的所有其他功能,因此我不想使用 next.js。甚至有可能吗?