Skip to content

Commit 9b0ff10

Browse files
committed
remove comments
1 parent dc8265a commit 9b0ff10

File tree

6 files changed

+3
-25
lines changed

6 files changed

+3
-25
lines changed

packages/next/build/webpack-config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,8 @@ export default async function getBaseWebpackConfig(
12271227
moduleIds: isClient ? 'deterministic' : 'named',
12281228
}
12291229
: {}),
1230+
moduleIds: 'named',
1231+
chunkIds: 'named',
12301232
splitChunks: (():
12311233
| Required<webpack.Configuration>['optimization']['splitChunks']
12321234
| false => {
@@ -1479,11 +1481,7 @@ export default async function getBaseWebpackConfig(
14791481
include: [
14801482
dir,
14811483
// To let the internal client components passing through flight loader
1482-
// /next[\\/]dist[\\/]client[\\/]components[\\/][\w-]+\.client\.js$/,
14831484
/next[\\/]dist[\\/]client[\\/]/,
1484-
// To let next/* api entry files passing through flight loader instead
1485-
// of the internal implementation files
1486-
// /next[\\/](link|image|future[\\/]image)/,
14871485
],
14881486
issuerLayer: WEBPACK_LAYERS.server,
14891487
use: {

packages/next/build/webpack/loaders/next-flight-loader/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
getRSCModuleType,
66
} from '../../../analysis/get-page-static-info'
77
import { parse } from '../../../swc'
8-
// import { isNextBuiltInClientComponent } from '../utils'
98

109
function transformClient(resourcePath: string): string {
1110
const output = `
@@ -79,14 +78,6 @@ export default async function transformSource(
7978
// Exclude next internal files which are not marked as client files
8079
buildInfo.rsc = { type: rscType }
8180

82-
// Mark next.js internal client components as client rsc module
83-
// if (
84-
// /next[\\/]dist[\\/]client[\\/]/.test(resourcePath) ||
85-
// isNextBuiltInClientComponent(resourcePath)
86-
// ) {
87-
// buildInfo.rsc = { type: 'client' }
88-
// }
89-
9081
if (buildInfo.rsc?.type === RSC_MODULE_TYPES.client) {
9182
errorForInvalidDataFetching(this.emitError)
9283
const code = transformClient(this.resourcePath)

packages/next/build/webpack/loaders/next-swc-loader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ export function pitch() {
138138
export default function swcLoader(inputSource, inputSourceMap) {
139139
const loaderSpan = this.currentTraceSpan.traceChild('next-swc-loader')
140140
const callback = this.async()
141-
console.log('inputSource', inputSource.toString())
142141
loaderSpan
143142
.traceAsyncFn(() =>
144143
loaderTransform.call(this, loaderSpan, inputSource, inputSourceMap)

packages/next/build/webpack/loaders/utils.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ const imageRegex = new RegExp(`\\.(${imageExtensions.join('|')})$`)
77
const NEXT_API_CLIENT_RSC_REGEX = new RegExp(
88
`next[\\\\/]dist[\\\\/]client[\\\\/](${nextClientComponents.join('|')})\\.js$`
99
)
10-
// const NEXT_BUILT_IN_CLIENT_RSC_REGEX = new RegExp(
11-
// `next[\\\\/](${nextClientComponents.join('|')})\\.js$`
12-
// )
1310

1411
// Cover resource paths like `next/*` and `next/dist/client/*`
1512
export function isNextBuiltInClientComponent(resource: string) {
16-
return (
17-
// NEXT_BUILT_IN_CLIENT_RSC_REGEX.test(resource) ||
18-
NEXT_API_CLIENT_RSC_REGEX.test(resource)
19-
)
13+
return NEXT_API_CLIENT_RSC_REGEX.test(resource)
2014
}
2115

2216
export function isClientComponentModule(mod: {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'client'
2-
31
export default function DashboardLoading() {
42
return <>Loading dashboard...</>
53
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'client'
2-
31
export default function GlobalLoading() {
42
return <>Loading...</>
53
}

0 commit comments

Comments
 (0)