From 54d32509cf9bd786b9d677bfdd9253de3bf36477 Mon Sep 17 00:00:00 2001 From: Paulo Victor <165944245+paulovictor-cb@users.noreply.github.com> Date: Mon, 27 May 2024 09:50:42 -0300 Subject: [PATCH] Adds Nextjs Loader (#909) * feat: adds nextjs loader to swc * feat: requested change --- package-lock.json | 17 +++++++---------- package.json | 2 +- src/app/[locale]/layout.tsx | 8 ++++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index f9e365075..4839bdd0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ "next-i18n-router": "^5.0.2", "next-sitemap": "^4.2.3", "next-themes": "^0.2.1", - "nextjs-toploader": "^1.6.6", + "nextjs-toploader": "^1.6.12", "obscenity": "^0.2.0", "p-limit": "^5.0.0", "p-retry": "^6.2.0", @@ -12558,11 +12558,6 @@ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, - "node_modules/@types/nprogress": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@types/nprogress/-/nprogress-0.2.3.tgz", - "integrity": "sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==" - }, "node_modules/@types/parse-json": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", @@ -28402,14 +28397,16 @@ } }, "node_modules/nextjs-toploader": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/nextjs-toploader/-/nextjs-toploader-1.6.6.tgz", - "integrity": "sha512-LKow/aV28/DLhj4yH1E8ydF/I5QDNsb5NqlbsXBaIVFrmZ9/OGHyxPLdumvPE2IOYoQdvJ4XWoaCA1v7aivYBg==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/nextjs-toploader/-/nextjs-toploader-1.6.12.tgz", + "integrity": "sha512-nbun5lvVjlKnxLQlahzZ55nELVEduqoEXT03KCHnsEYJnFpI/3BaIzpMyq/v8C7UGU2NfxQmjq6ldZ310rsDqA==", "dependencies": { - "@types/nprogress": "^0.2.2", "nprogress": "^0.2.0", "prop-types": "^15.8.1" }, + "funding": { + "url": "https://github.com/sponsors/TheSGJ" + }, "peerDependencies": { "next": ">= 6.0.0", "react": ">= 16.0.0", diff --git a/package.json b/package.json index c164a0aca..dc2472236 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "next-i18n-router": "^5.0.2", "next-sitemap": "^4.2.3", "next-themes": "^0.2.1", - "nextjs-toploader": "^1.6.6", + "nextjs-toploader": "^1.6.12", "obscenity": "^0.2.0", "p-limit": "^5.0.0", "p-retry": "^6.2.0", diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 1bcdc6e66..6c83d01b5 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -2,6 +2,7 @@ import { SpeedInsights } from '@vercel/speed-insights/next' import { capitalize } from 'lodash-es' import type { Metadata, Viewport } from 'next' import { notFound } from 'next/navigation' +import NextTopLoader from 'nextjs-toploader' import { TopLevelClientLogic } from '@/app/[locale]/topLevelClientLogic' import { CookieConsent } from '@/components/app/cookieConsent' @@ -71,8 +72,11 @@ export default function Layout({ children, params }: PageProps & { children: Rea - {/* LATER-TASK add back once https://github.com/TheSGJ/nextjs-toploader/issues/66 is resolved */} - {/* */} +