next.js/test/e2e/app-dir/webpack-loader-binary/next.config.js
next.config.js31 lines584 B
/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  turbopack: {
    rules: {
      '*.txt': {
        loaders: ['./test-file-loader.js'],
        as: '*.js',
      },
      '*.mp4': {
        loaders: [require.resolve('./test-file-loader.js')],
        as: '*.js',
      },
    },
  },
  webpack(config) {
    config.module.rules.push({
      test: /\.txt/,
      use: './test-file-loader.js',
    })
    config.module.rules.push({
      test: /\.mp4/,
      use: require.resolve('./test-file-loader.js'),
    })
    return config
  },
}

module.exports = nextConfig
Quest for Codev2.0.0
/
SIGN IN