// @ts-check
const withNextIntl = require('next-intl/plugin')();
const path = require('path');
const json = require('./package.json');

/** @type {import('next').NextConfig} */
const nextConfig = {
	compiler: {
		styledComponents: {
			ssr: true,
			displayName: true,
			namespace: 'bbuddy'
		}
	},
	sassOptions: {
		includePaths: [path.join(__dirname, 'styles')],
	},
	env: {
		version: json.version
	},
	typescript: {
		// !! WARN !!
		// Dangerously allow production builds to successfully complete even if
		// your project has type errors.
		// !! WARN !!
		ignoreBuildErrors: true,
	},
	images: {
		unoptimized: true
	},
	experimental: {
		taint: true,
		// typedRoutes: true
	},
	// output: 'standalone',
	poweredByHeader: false,
	productionBrowserSourceMaps: true
};

module.exports = withNextIntl(nextConfig);