Skip to content

Commit

Permalink
fix alias
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Dec 13, 2023
1 parent 1a1e003 commit 87cb167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/src/build/create-compiler-aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export function createWebpackAliases({
}

return {
'@vercel/og': 'next/dist/server/og/image-response',
'@vercel/og$': 'next/dist/server/og/image-response',
// avoid ESM import from directory - error code: ERR_UNSUPPORTED_DIR_IMPORT
'^next/dist/compiled/@vercel/og$':
'next/dist/compiled/@vercel/og$':
'next/dist/compiled/@vercel/og/index.node.js',

// Alias next/dist imports to next/dist/esm assets,
Expand Down Expand Up @@ -147,7 +147,7 @@ export function createWebpackAliases({

// Adding dynamic alias for next/dist/compiled/@vercel/og,
// as conditionNames didn't pick up the export asset properly.
'^next/dist/compiled/@vercel/og$':
'next/dist/compiled/@vercel/og$':
'next/dist/compiled/@vercel/og/index.edge.js',
}
: undefined),
Expand Down

0 comments on commit 87cb167

Please sign in to comment.