douyin-archive/next.config.ts
2025-11-29 21:56:38 +08:00

32 lines
717 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: [
'playwright-extra',
'puppeteer-extra-plugin-stealth',
'puppeteer-extra-plugin',
], webpack: (config) => {
config.module.rules.push({
test: /\.(md|txt)$/i,
type: 'asset/source', // 让这些文件作为纯文本注入
});
return config;
}, turbopack: {
rules: {
'*.md': { loaders: ['raw-loader'], as: '*.js' },
'*.txt': { loaders: ['raw-loader'], as: '*.js' },
},
},
/* config options here */
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 's3l.xn--876a.net',
},
],
},
};
export default nextConfig;