Skip to content

Commit

Permalink
Removed Pino and related dependencies to compile a static website
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Jun 8, 2024
1 parent b1d6f42 commit aecc9ac
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 385 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# NextJS parameters
NEXT_LOGGING=true
NEXT_PUBLIC_ENV=development
NEXT_PUBLIC_TIMEZONE=Europe/Paris

Expand Down
7 changes: 0 additions & 7 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { unstable_setRequestLocale, getMessages } from "next-intl/server";
import type { Metadata, Viewport } from "next";

// Importation des fonctions utilitaires.
import { logger } from "@/utilities/pino";
import { getLanguages } from "@/utilities/i18n";

// Importation des composants.
Expand Down Expand Up @@ -172,11 +171,6 @@ export async function generateMetadata(): Promise<

// On enregistre enfin les m茅tadonn茅es dans un fichier JSON
// avant de les retourner.
logger.warn(
{ source: __filename, metadata },
"Loading metadata from GitHub API"
);

await writeFile( filePath, JSON.stringify( metadata ) );

return metadata;
Expand Down Expand Up @@ -211,7 +205,6 @@ export default async function Layout( {
// V茅rification du support de la langue.
if ( !languages.includes( locale ) )
{
logger.error( { source: __filename, locale }, "Unsupported language" );
return null;
}

Expand Down
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ const withNextIntl = createNextIntlPlugin( "./utilities/i18n.ts" );
*/
module.exports = withNextIntl( {
poweredByHeader: false,
experimental: {
// https://github.com/vercel/next.js/discussions/46987#discussioncomment-8464812
serverComponentsExternalPackages: ["pino", "pino-pretty"]
},
basePath: "",
async redirects()
{
Expand Down
Loading

0 comments on commit aecc9ac

Please sign in to comment.