From 69cee04dba31c5225a9fbaef8fa6b90d49fc8527 Mon Sep 17 00:00:00 2001 From: ZLY Date: Tue, 23 Sep 2025 10:04:05 +0800 Subject: [PATCH] =?UTF-8?q?build(next):=20=E9=85=8D=E7=BD=AE=E9=9D=99?= =?UTF-8?q?=E6=80=81=E5=AF=BC=E5=87=BA=E5=B9=B6=E6=9B=B4=E6=96=B0=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 6adbc63..75046fc 100644 --- a/next.config.js +++ b/next.config.js @@ -15,6 +15,8 @@ const target = process.env.NEXT_PUBLIC_DEV_SERVER_HOST; module.exports = withLess( withTM({ + // 静态导出配置 + output: 'export', lessLoaderOptions: { lessOptions: { modifyVars: { diff --git a/package.json b/package.json index aa3d7b6..7a2deed 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "dev": "next dev -H 0.0.0.0 -p 4121", "build": "next build", "start": "next start", - "export": "next export", + "export": "next build && next export", "eslint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix --cache", "stylelint": "stylelint 'src/**/*.less' 'src/**/*.css' --fix --cache", "pre-commit": "pretty-quick --staged && npm run eslint && npm run stylelint"