Skip to content

Commit

Permalink
fix: default image path
Browse files Browse the repository at this point in the history
  • Loading branch information
aiji42 committed Jul 4, 2021
1 parent 946aaa9 commit f73360c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/with-split.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('withSplit', () => {
}
})
expect(conf.assetPrefix).toEqual('')
expect(conf.images).toEqual({ path: '' })
expect(conf.images).toEqual({ path: '/_next/image' })
expect(conf.serverRuntimeConfig).toEqual({
splits: {
test1: {
Expand Down
2 changes: 1 addition & 1 deletion src/with-split.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const withSplit = (args: WithSplitArgs): WithSplitResult => {
assetPrefix: nextConfig.assetPrefix || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''),
images: {
...nextConfig.images,
path: nextConfig.images?.path || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}/_next/image` : '')
path: nextConfig.images?.path || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}/_next/image` : '/_next/image')
},
serverRuntimeConfig: {
...nextConfig.serverRuntimeConfig,
Expand Down

0 comments on commit f73360c

Please sign in to comment.