2025-01-03 17:23:23 +00:00
|
|
|
import type { NextConfig } from "next";
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
2025-01-03 18:23:58 +00:00
|
|
|
/* config options here */
|
|
|
|
webpack(config, { isServer }) {
|
|
|
|
// 仅在服务器端处理 .node 文件
|
|
|
|
if (isServer) {
|
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.node$/,
|
|
|
|
use: 'node-loader', // 使用 node-loader 处理 .node 文件
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return config;
|
|
|
|
},
|
2025-01-03 17:23:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default nextConfig;
|