Update the Next.js configuration for v14

This commit is contained in:
James M. Greene
2024-03-27 14:48:01 -05:00
parent b490f538fb
commit 150fac6047
7 changed files with 15 additions and 9 deletions

7
dist/index.js vendored
View File

@@ -16990,13 +16990,16 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
configurationFile: generatorConfigFile || './next.config.js', configurationFile: generatorConfigFile || './next.config.js',
blankConfigurationFile: __nccwpck_require__.ab + "next.js", blankConfigurationFile: __nccwpck_require__.ab + "next.js",
properties: { properties: {
// Static export
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports#version-history
output: 'export',
// Configure a base path // Configure a base path
// https://nextjs.org/docs/app/api-reference/next-config-js/basePath
basePath: path, basePath: path,
// Disable server side image optimization too // Disable server side image optimization too
// https://nextjs.org/docs/api-reference/next/image#unoptimized // https://nextjs.org/docs/api-reference/next/image#unoptimized
'experimental.images.unoptimized': true,
// No longer experimental as of Next.js v12.3.0
'images.unoptimized': true 'images.unoptimized': true
} }
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,3 @@
// Default Pages configuration for Next // Default Pages configuration for Next
const nextConfig = { images: { unoptimized: true }, experimental: { images: { unoptimized: true } }, basePath: '/docs' } const nextConfig = { images: { unoptimized: true }, basePath: '/docs', output: 'export' }
module.exports = nextConfig module.exports = nextConfig

View File

@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
images: { unoptimized: true }, images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs', basePath: '/docs',
output: 'export',
reactStrictMode: true, reactStrictMode: true,
swcMinify: true swcMinify: true
} }

View File

@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
images: { unoptimized: true }, images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs', basePath: '/docs',
output: 'export',
reactStrictMode: true, reactStrictMode: true,
swcMinify: true swcMinify: true
} }

View File

@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
images: { unoptimized: true }, images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs', basePath: '/docs',
output: 'export',
reactStrictMode: true, reactStrictMode: true,
swcMinify: true swcMinify: true
} }

View File

@@ -31,13 +31,16 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
configurationFile: generatorConfigFile || './next.config.js', configurationFile: generatorConfigFile || './next.config.js',
blankConfigurationFile: `${__dirname}/blank-configurations/next.js`, blankConfigurationFile: `${__dirname}/blank-configurations/next.js`,
properties: { properties: {
// Static export
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports#version-history
output: 'export',
// Configure a base path // Configure a base path
// https://nextjs.org/docs/app/api-reference/next-config-js/basePath
basePath: path, basePath: path,
// Disable server side image optimization too // Disable server side image optimization too
// https://nextjs.org/docs/api-reference/next/image#unoptimized // https://nextjs.org/docs/api-reference/next/image#unoptimized
'experimental.images.unoptimized': true,
// No longer experimental as of Next.js v12.3.0
'images.unoptimized': true 'images.unoptimized': true
} }
} }