打包问题

This commit is contained in:
tangly1024.com
2024-07-16 10:08:16 +08:00
parent ccf0c18017
commit 70f4c35193
3 changed files with 4 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ const Slug = props => {
/**
* 验证文章密码
* @param {*} result
* @param {*} passInput
*/
const validPassword = passInput => {
if (!post) {
@@ -129,7 +129,7 @@ export async function getStaticProps({ params: { prefix }, locale }) {
fullSlug += '.html'
}
}
// 在列表内查找文章
props.post = props?.allPages?.find(p => {
return (

View File

@@ -5,11 +5,9 @@ import Slug from '../[prefix]'
/**
/**
* 服务端接收参数处理
* @param {*} ctx
* @returns
*/
export const getServerSideProps = async ctx => {
export const getStaticProps = async () => {
const from = `auth`
const props = await getGlobalData({ from })

View File

@@ -21,7 +21,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "react-jsx"
},
"include": [
"next-env.d.ts",