This commit is contained in:
Timo Knuth
2026-04-27 22:21:52 +02:00
parent c4fac0f726
commit 9b31e77daa
9 changed files with 371 additions and 56 deletions

View File

@@ -1,18 +1,18 @@
import os from 'os';
import path from 'path';
function isWslOnWindowsMount() {
return process.platform === 'linux' && process.cwd().startsWith('/mnt/');
}
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
skipTrailingSlashRedirect: true,
eslint: {
ignoreDuringBuilds: true,
},
images: {
import os from 'os';
import path from 'path';
function isWslOnWindowsMount() {
return process.platform === 'linux' && process.cwd().startsWith('/mnt/');
}
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
skipTrailingSlashRedirect: true,
eslint: {
ignoreDuringBuilds: true,
},
images: {
unoptimized: false,
remotePatterns: [
{ protocol: 'https', hostname: 'www.qrmaster.net' },
@@ -29,23 +29,23 @@ const nextConfig = {
// Allow build to succeed even with prerender errors
// Pages with useSearchParams() will be rendered dynamically at runtime
staticPageGenerationTimeout: 120,
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
poweredByHeader: false,
webpack: (config, { dev }) => {
if (!dev && isWslOnWindowsMount()) {
config.cache = {
type: 'filesystem',
cacheDirectory: path.join(os.tmpdir(), 'qrmaster-next-webpack-cache'),
};
}
return config;
},
async redirects() {
return [
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
poweredByHeader: false,
webpack: (config, { dev }) => {
if (!dev && isWslOnWindowsMount()) {
config.cache = {
type: 'filesystem',
cacheDirectory: path.join(os.tmpdir(), 'qrmaster-next-webpack-cache'),
};
}
return config;
},
async redirects() {
return [
{
source: '/create-qr',
destination: '/dynamic-qr-code-generator',
@@ -71,14 +71,9 @@ const nextConfig = {
destination: '/tools/call-qr-code-generator',
permanent: true,
},
{
source: '/barcode-generator',
destination: '/tools/barcode-generator',
permanent: true,
},
{
source: '/bar-code-generator',
destination: '/tools/barcode-generator',
destination: '/barcode-generator',
permanent: true,
},
{