Skip to content

Commit 7f0ffc4

Browse files
shudingvorcigernix
authored andcommitted
chore: Rename internal Webpack plugin (vercel#46088)
Rename `FlightTypesPlugin` to `NextTypesPlugin` as it's more general now (handles https://beta.nextjs.org/docs/configuring/typescript#statically-typed-links as well). `test/integration/app-link-types` was a non-existing test that I accidentally committed previously. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
1 parent b0ade14 commit 7f0ffc4

File tree

4 files changed

+5
-31
lines changed

4 files changed

+5
-31
lines changed

packages/next/src/build/webpack-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { regexLikeCss } from './webpack/config/blocks/css'
4848
import { CopyFilePlugin } from './webpack/plugins/copy-file-plugin'
4949
import { FlightManifestPlugin } from './webpack/plugins/flight-manifest-plugin'
5050
import { FlightClientEntryPlugin } from './webpack/plugins/flight-client-entry-plugin'
51-
import { FlightTypesPlugin } from './webpack/plugins/flight-types-plugin'
51+
import { NextTypesPlugin } from './webpack/plugins/next-types-plugin'
5252
import type {
5353
Feature,
5454
SWC_TARGET_TRIPLE,
@@ -2177,7 +2177,7 @@ export default async function getBaseWebpackConfig(
21772177
})),
21782178
hasAppDir &&
21792179
!isClient &&
2180-
new FlightTypesPlugin({
2180+
new NextTypesPlugin({
21812181
dir,
21822182
distDir: config.distDir,
21832183
appDir,

packages/next/src/build/webpack/plugins/flight-types-plugin.ts renamed to packages/next/src/build/webpack/plugins/next-types-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { WEBPACK_LAYERS } from '../../../lib/constants'
66
import { normalizeAppPath } from '../../../shared/lib/router/utils/app-paths'
77
import { isDynamicRoute } from '../../../shared/lib/router/utils'
88

9-
const PLUGIN_NAME = 'FlightTypesPlugin'
9+
const PLUGIN_NAME = 'NextTypesPlugin'
1010

1111
interface Options {
1212
dir: string
@@ -191,7 +191,7 @@ declare module 'next' {
191191
}`
192192
}
193193

194-
export class FlightTypesPlugin {
194+
export class NextTypesPlugin {
195195
dir: string
196196
distDir: string
197197
appDir: string

packages/next/src/server/dev/next-dev-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import {
7979
import { getDefineEnv } from '../../build/webpack-config'
8080
import loadJsConfig from '../../build/load-jsconfig'
8181
import { formatServerError } from '../../lib/format-server-error'
82-
import { pageFiles } from '../../build/webpack/plugins/flight-types-plugin'
82+
import { pageFiles } from '../../build/webpack/plugins/next-types-plugin'
8383
import {
8484
DevRouteMatcherManager,
8585
RouteEnsurer,

test/integration/app-link-types/tsconfig.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)