Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Apr 12, 2022
1 parent 2e4ee2f commit 21fddb2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/next/build/webpack/loaders/next-flight-server-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,17 @@ async function parseModuleInfo({
return [isBuiltinModule, isNodeModuleImport] as const
}

function addClientImport(importSource: string) {
if (
isServerComponent(importSource) ||
hasFlightLoader(importSource, 'server')
) {
function addClientImport(source: string) {
if (isServerComponent(source) || hasFlightLoader(source, 'server')) {
// If it's a server component, we recursively import its dependencies.
imports.push(importSource)
} else if (isClientComponent(importSource)) {
imports.push(source)
} else if (isClientComponent(source)) {
// Client component.
imports.push(importSource)
imports.push(source)
} else {
// Shared component.
imports.push(
createFlightServerRequest(importSource, {
createFlightServerRequest(source, {
extensions,
client: 1,
})
Expand Down Expand Up @@ -198,6 +195,7 @@ async function parseModuleInfo({
}
}
}
break
default:
break
}
Expand Down

0 comments on commit 21fddb2

Please sign in to comment.