Files
lobehub/next.config.mjs
canisminor1990 23524b200a ♻️ refactor: Update configurations, remove unused files, and adjust components and selectors
The code changes involve updating configurations, removing unused files, and making adjustments to components and selectors. These changes are done to improve the overall structure and organization of the project.
2023-07-16 00:31:53 +08:00

36 lines
740 B
JavaScript

import i18nConfig from './next-i18next.config.js';
const API_END_PORT_URL = process.env.API_END_PORT_URL || '';
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n: i18nConfig.i18n,
reactStrictMode: true,
pageExtensions: ['page.tsx', 'api.ts'],
transpilePackages: ['@lobehub/ui', 'antd-style'],
webpack(config) {
config.experiments = {
asyncWebAssembly: true,
layers: true,
};
return config;
},
async rewrites() {
return [
{
source: '/api/openai-dev',
destination: `${API_END_PORT_URL}/api/openai`,
},
{
source: '/api/chain-dev',
destination: `${API_END_PORT_URL}/api/chain`,
},
];
},
};
export default nextConfig;