Skip to content

Commit

Permalink
revert import path
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jul 15, 2022
1 parent 6e8a166 commit 36eda6c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/next/build/webpack/plugins/client-entry-plugin.ts
Expand Up @@ -79,18 +79,15 @@ export class ClientEntryPlugin {
if (!mod) return

// Keep client imports as simple
// js module: -> raw request, e.g. next/head
// client js: -> relative imports
// TODO-APP: applied loaders for css
// *.css (with loaders applied): -> relative css imports
// native or installed js module: -> raw request, e.g. next/head
// client js or css: -> user request
const rawRequest = mod.rawRequest || ''
const { relativePath } = mod.resourceResolveData || {}
const modRequest =
!rawRequest.endsWith('.css') &&
!rawRequest.startsWith('.') &&
!rawRequest.startsWith('/')
? rawRequest
: relativePath || mod.userRequest
: mod.userRequest

if (visited.has(modRequest)) return
visited.add(modRequest)
Expand Down

0 comments on commit 36eda6c

Please sign in to comment.