feat: add env validation

This commit is contained in:
Jakub Jablonski 2023-05-03 19:16:12 +02:00
parent 0742f20372
commit 9b51b32a43
2 changed files with 17 additions and 1 deletions

View file

@ -1,10 +1,11 @@
import withBundleAnalyzer from "@next/bundle-analyzer"
import withPlugins from "next-compose-plugins"
import { env } from "./env.mjs"
/**
* @type {import('next').NextConfig}
*/
const config = withPlugins([[withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" })]], {
const config = withPlugins([[withBundleAnalyzer({ enabled: env.ANALYZE })]], {
reactStrictMode: true,
experimental: { instrumentationHook: true },
rewrites() {