gebeya-dala-error-fixer
Version:
Automatic runtime error detection and fix suggestions for Next.js applications with config-based setup
41 lines (36 loc) • 1.12 kB
JavaScript
// next.config.js
// Example Next.js configuration with gebeya-dala-error-fixer plugin
const withErrorDetector = require('gebeya-dala-error-fixer/dist/nextjs-plugin');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Your other Next.js config options here
};
// Option 1: Using the plugin with default settings
module.exports = withErrorDetector()(nextConfig);
// Option 2: Using the plugin with custom configuration
// module.exports = withErrorDetector({
// enabled: true,
// autoShow: true,
// position: 'bottom-right',
// environment: 'development',
// theme: 'dark',
// fixItButton: {
// enabled: true,
// customAction: (error, suggestion) => {
// console.log('Custom fix action:', error, suggestion);
// // Your custom logic here
// }
// }
// })(nextConfig);
// Option 3: Alternative configuration using errorDetector key
// module.exports = {
// ...nextConfig,
// errorDetector: {
// enabled: true,
// autoShow: true,
// position: 'top-right',
// environment: 'development',
// theme: 'dark',
// }
// };