Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Next.js configuration for v14 #137

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16990,13 +16990,16 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
configurationFile: generatorConfigFile || './next.config.js',
blankConfigurationFile: __nccwpck_require__.ab + "next.js",
properties: {
// Static export
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports#version-history
output: 'export',

// Configure a base path
// https://nextjs.org/docs/app/api-reference/next-config-js/basePath
basePath: path,

// Disable server side image optimization too
// 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
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/fixtures/next/blank.expected.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 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
2 changes: 1 addition & 1 deletion src/fixtures/next/default.expected.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs',
output: 'export',
reactStrictMode: true,
swcMinify: true
}
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/next/default.expected.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs',
output: 'export',
reactStrictMode: true,
swcMinify: true
}
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/next/default.expected.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: { unoptimized: true },
experimental: { images: { unoptimized: true } },
basePath: '/docs',
output: 'export',
reactStrictMode: true,
swcMinify: true
}
Expand Down
7 changes: 5 additions & 2 deletions src/set-pages-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
configurationFile: generatorConfigFile || './next.config.js',
blankConfigurationFile: `${__dirname}/blank-configurations/next.js`,
properties: {
// Static export
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports#version-history
output: 'export',

// Configure a base path
// https://nextjs.org/docs/app/api-reference/next-config-js/basePath
basePath: path,

// Disable server side image optimization too
// 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
}
}
Expand Down