nezha_dash/next.config.mjs
2024-10-21 02:19:30 +08:00

38 lines
829 B
JavaScript

import withPWAInit from "@ducanh2912/next-pwa";
import withBundleAnalyzer from "@next/bundle-analyzer";
import createNextIntlPlugin from "next-intl/plugin";
const bundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});
const withNextIntl = createNextIntlPlugin();
const withPWA = withPWAInit({
dest: "public",
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
disable: false,
workboxOptions: {
disableDevLogs: true,
},
});
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
reactStrictMode: true,
experimental: {
serverActions: {
allowedOrigins: ["*"],
},
},
logging: {
fetches: {
fullUrl: true,
},
},
};
export default bundleAnalyzer(withPWA(withNextIntl(nextConfig)));