Next打包导出静态文件(纯前端),不要服务器端(node), 隐藏左下角调试模式(“next“: “^15.3.3“,)
在next.config.js配置,没有就新建,npm run build这时候打包就是和vue一样静态文件了
/** @type {import('next').NextConfig} */
const nextConfig = {output: 'export', // 启用静态导出模式// 可选:指定自定义导出目录distDir: 'out',
};module.exports = nextConfig;
/** @type {import('next').NextConfig} */
const nextConfig = {output: 'export', // 启用静态导出模式// 可选:指定自定义导出目录distDir: 'out',// 隐藏左下角调试模式devIndicators:false,
};module.exports = nextConfig;
文件