mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
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.
36 lines
740 B
JavaScript
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;
|