-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade to Next.js 15 * added vercel analytics
- Loading branch information
1 parent
bcab44b
commit 9ed9a9e
Showing
35 changed files
with
12,303 additions
and
9,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,47 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const withPWA = require("next-pwa")({ | ||
dest: "public", | ||
disable: process.env.NODE_ENV === "development", | ||
register: true, | ||
runtimeCaching: require("next-pwa/cache"), | ||
buildExcludes: [ | ||
/middleware-manifest\.json$/, | ||
/middleware-runtime\.js$/, | ||
/_middleware\.js$/, | ||
/^.+\\_middleware\.js$/, | ||
], | ||
publicExcludes: ["!robots.txt"], | ||
}); | ||
|
||
const nextConfig = { | ||
reactStrictMode: false, | ||
reactStrictMode: true, | ||
|
||
webpack(config, { isServer }) { | ||
// Handle SVG files | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: ["@svgr/webpack"], | ||
}); | ||
|
||
// Handle fs fallback for client-side | ||
if (!isServer) { | ||
config.resolve.fallback = { | ||
fs: false, | ||
}; | ||
} | ||
|
||
return config; | ||
}, | ||
|
||
images: { | ||
domains: [], | ||
remotePatterns: [], | ||
}, | ||
|
||
experimental: {}, | ||
}; | ||
const withPWA = require("next-pwa"); | ||
const runtimeCaching = require("next-pwa/cache"); | ||
const withReactSvg = require("next-react-svg"); | ||
const path = require("path"); | ||
|
||
// Load environment variables | ||
require("dotenv").config(); | ||
|
||
module.exports = withPWA( | ||
withReactSvg({ | ||
pwa: { | ||
disable: process.env.NODE_ENV === "development", | ||
dest: "public", | ||
register: true, | ||
runtimeCaching, | ||
buildExcludes: [ | ||
/\/*server\/middleware-chunks\/[0-9]*[a-z]*[A-Z]*\.js$/, | ||
/middleware-manifest\.json$/, | ||
/middleware-runtime\.js$/, | ||
/_middleware\.js$/, | ||
/^.+\\_middleware\.js$/, | ||
], | ||
publicExcludes: ["!robots.txt"], | ||
}, | ||
nextConfig, | ||
include: path.resolve(__dirname, "src/assets/svgs"), | ||
webpack(config) { | ||
return config; | ||
}, | ||
}) | ||
); | ||
module.exports = withPWA(nextConfig); |
Oops, something went wrong.