Skip to content

Commit

Permalink
fix(next): Don't set basePath for a repo with a custom URL
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Feb 14, 2023
1 parent 37538b2 commit f294021
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/set-pages-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
configurationFile: generatorConfigFile || './next.config.js',
blankConfigurationFile: `${__dirname}/blank-configurations/next.js`,
properties: {
// Configure a base path
basePath: path,
// Disable base path as this is breaking the paths
// when having a custom URL pointing directly to the repo
// and the resources should be delivered from / instead of /path
// basePath: path,

// Disable server side image optimization too
// https://nextjs.org/docs/api-reference/next/image#unoptimized
Expand Down

0 comments on commit f294021

Please sign in to comment.