1 Star 0 Fork 30

追梦大叔 / MP_WeiXin_ChatGPT

forked from CyrusZhou / MP_WeiXin_ChatGPT 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
next.config.js 987 Bytes
一键复制 编辑 原始数据 按行查看 历史
CyrusZhou 提交于 2023-05-20 09:16 . middleware排除静态资源
// next.config.js
const path = require('path');
require('dotenv').config();
const { loadCustomBuildParams } = require('./next-utils.config')
const { esmExternals = false, tsconfigPath } = loadCustomBuildParams()
const { i18n } = require('./next-i18next.config');
// const nextauthConfig = require('./nextauth.config.js');
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
i18n,
// nextauthConfig,
experimental: {
esmExternals,
},
trailingSlash: true,
reactStrictMode: true,
typescript: {
tsconfigPath,
},
webpack: (config, { isServer }) => {
if (!isServer) {
// 让 next-i18next 的客户端部分正常工作
config.resolve.fallback.intl_pluralrules = require.resolve('intl-pluralrules')
}
return config;
},
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
module: {
rules: [
{
test: /\.md$/,
use: 'raw-loader',
},
],
},
}
module.exports = nextConfig;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/zmds-IT/MP_WeiXin_ChatGPT.git
git@gitee.com:zmds-IT/MP_WeiXin_ChatGPT.git
zmds-IT
MP_WeiXin_ChatGPT
MP_WeiXin_ChatGPT
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891