Skip to content

Commit

Permalink
BREAKING CHANGE: Rename next/image to next/legacy/image & rename …
Browse files Browse the repository at this point in the history
…`next/future/image` to `next/image` (#41399)

This PR introduces breaking changes by renaming components.

- Rename `next/image` to `next/legacy/image`
- Rename `next/future/image` to `next/image`

The diff is very confusing because both components are very similar so git got confused.
  • Loading branch information
styfle committed Oct 14, 2022
1 parent 560e93e commit 241195d
Show file tree
Hide file tree
Showing 314 changed files with 1,226 additions and 1,121 deletions.
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Expand Up @@ -1067,7 +1067,7 @@ export default async function getBaseWebpackConfig(
}

const notExternalModules =
/^(?:private-next-pages\/|next\/(?:dist\/pages\/|(?:app|document|link|image|future\/image|constants|dynamic|script|navigation|headers)$)|string-hash|private-next-rsc-mod-ref-proxy$)/
/^(?:private-next-pages\/|next\/(?:dist\/pages\/|(?:app|document|link|image|legacy\/image|constants|dynamic|script|navigation|headers)$)|string-hash|private-next-rsc-mod-ref-proxy$)/
if (notExternalModules.test(request)) {
return
}
Expand Down
2 changes: 2 additions & 0 deletions packages/next/build/webpack/plugins/telemetry-plugin.ts
Expand Up @@ -21,6 +21,7 @@ export type SWC_TARGET_TRIPLE =
export type Feature =
| 'next/image'
| 'next/future/image'
| 'next/legacy/image'
| 'next/script'
| 'next/dynamic'
| 'swcLoader'
Expand Down Expand Up @@ -58,6 +59,7 @@ interface Connection {
const FEATURE_MODULE_MAP: ReadonlyMap<Feature, string> = new Map([
['next/image', '/next/image.js'],
['next/future/image', '/next/future/image.js'],
['next/legacy/image', '/next/legacy/image.js'],
['next/script', '/next/script.js'],
['next/dynamic', '/next/dynamic.js'],
])
Expand Down

0 comments on commit 241195d

Please sign in to comment.