Skip to content

Commit

Permalink
fix: remove query from resolved src import
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 27, 2020
1 parent f94685a commit 0330b2a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node/server/serverPluginVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ensureMapEntry,
hmrClientPublicPath
} from './serverPluginHmr'
import { resolveFrom, cachedRead, genSourceMapString } from '../utils'
import { resolveFrom, cachedRead, genSourceMapString, cleanUrl } from '../utils'
import { Context } from 'koa'
import { transform } from '../esbuildService'
import { InternalResolver } from '../resolver'
Expand Down Expand Up @@ -276,7 +276,9 @@ async function resolveSrcImport(
resolver: InternalResolver
) {
const importer = ctx.path
const importee = resolveImport(root, importer, block.src!, resolver)
const importee = cleanUrl(
resolveImport(process.cwd(), importer, block.src!, resolver)
)
const filePath = resolver.requestToFile(importee)
await cachedRead(ctx, filePath)
block.content = ctx.body
Expand Down

0 comments on commit 0330b2a

Please sign in to comment.