blob: 307d5bdc54e782219aefcb4d0e64f3fd507b6f83 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import MillionLint from "@million/lint";
import { setupDevPlatform } from "@cloudflare/next-on-pages/next-dev";
/** @type {import('next').NextConfig} */
const baseNextConfig = {
transpilePackages: ["@repo/ui"],
reactStrictMode: false,
env: {
TELEGRAM_BOT_TOKEN: process.env.TELEGRAM_BOT_TOKEN,
},
eslint: {
disableDuringBuilds: true,
},
};
let selectedCofig = baseNextConfig;
if (process.env.NODE_ENV === "development") {
selectedCofig = MillionLint.next({
rsc: true,
})(baseNextConfig);
}
export default selectedCofig;
// we only need to use the utility during development so we can check NODE_ENV
// (note: this check is recommended but completely optional)
if (process.env.NODE_ENV === "development") {
// `await`ing the call is not necessary but it helps making sure that the setup has succeeded.
// If you cannot use top level awaits you could use the following to avoid an unhandled rejection:
// `setupDevPlatform().catch(e => console.error(e));`
await setupDevPlatform();
}
|