Skip to content

Commit

Permalink
fix next
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoann Chaudet committed Jul 19, 2022
1 parent 69fea3d commit 53eec1a
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 54 deletions.
5 changes: 5 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14831,6 +14831,11 @@ function getConfigParserSettings(staticSiteGenerator, path) {
blankConfigurationFile: __nccwpck_require__.ab + "nuxt.js"
}
case 'next':
// Next does not want a trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1)
}

return {
configurationFile: './next.config.js',
propertyName: 'basePath',
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions src/fixtures/gatsby-config.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/fixtures/gatsby-config.old.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/fixtures/next.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/fixtures/next.config.old.js

This file was deleted.

1 change: 0 additions & 1 deletion src/fixtures/next.config.old.missing.js

This file was deleted.

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 = { basePath: "/docs/" }
const nextConfig = { basePath: "/docs" }
module.exports = nextConfig
2 changes: 1 addition & 1 deletion src/fixtures/next/default.expected.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/docs/",
basePath: "/docs",
reactStrictMode: true,
swcMinify: true,
}
Expand Down
11 changes: 0 additions & 11 deletions src/fixtures/nuxt.config.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/fixtures/nuxt.config.missing.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/fixtures/nuxt.config.old.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/set-pages-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ function getConfigParserSettings(staticSiteGenerator, path) {
blankConfigurationFile: `${__dirname}/blank-configurations/nuxt.js`
}
case 'next':
// Next does not want a trailing slash
if (path.endsWith('/')) {
path = path.slice(0, -1)
}

return {
configurationFile: './next.config.js',
propertyName: 'basePath',
Expand Down

0 comments on commit 53eec1a

Please sign in to comment.