From 141cb9a1ce4d6257780863331028fdfe7accb017 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Fri, 4 Apr 2025 01:05:37 +0500 Subject: [PATCH] fix: next plugins use --- next.config.js | 22 ++++------------------ package-lock.json | 16 ++++++++++++++++ package.json | 1 + 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/next.config.js b/next.config.js index 627945f..bdba023 100644 --- a/next.config.js +++ b/next.config.js @@ -75,22 +75,8 @@ const NextConfig = { }, }; -const config = () => { - const plugins = [withPlausibleProxy, withFlowbiteReact]; - return ( - plugins.reduce((acc, next) => { - console.log(`INIT: ${next.name}`); - if (next.name === "withPlausibleProxy") { - return next(acc, { - customDomain: "https://analytics.wah.su", - }); - } +const config = withPlausibleProxy({ + customDomain: "https://analytics.wah.su", +})(withFlowbiteReact(NextConfig)); - return next(acc); - }), - { ...NextConfig } - ); -}; - -console.log(config()); -module.exports = config(); +module.exports = config; diff --git a/package-lock.json b/package-lock.json index 773239b..f5b0543 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "media-chrome": "^4.8.0", "next": "^14.2.26", "next-plausible": "^3.12.1", + "prettier": "^3.5.3", "react": "^18", "react-cropper": "^2.3.3", "react-dom": "^18", @@ -5532,6 +5533,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index 709f0c9..bc3c771 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "media-chrome": "^4.8.0", "next": "^14.2.26", "next-plausible": "^3.12.1", + "prettier": "^3.5.3", "react": "^18", "react-cropper": "^2.3.3", "react-dom": "^18",