23 lines
603 B
TypeScript
23 lines
603 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
webpack: (config, { isServer }) => {
|
|
// Ignore non-JavaScript files from node_modules
|
|
config.module.rules.push({
|
|
test: /\.md$/,
|
|
type: 'asset/source',
|
|
});
|
|
|
|
// Externalize @remotion packages on server to avoid bundling issues
|
|
if (isServer) {
|
|
config.externals.push('@remotion/bundler', '@remotion/renderer');
|
|
}
|
|
|
|
return config;
|
|
},
|
|
// Transpile Remotion packages if needed
|
|
transpilePackages: ['remotion', '@remotion/bundler', '@remotion/renderer'],
|
|
};
|
|
|
|
export default nextConfig;
|