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"