Skip to content

Commit

Permalink
fix: decodeURIComponent for module resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Jun 15, 2020
1 parent e262299 commit 4e8ffa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/server/serverPluginModuleResolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const moduleResolvePlugin: ServerPlugin = ({ root, app, resolver }) => {
return next()
}

const id = ctx.path.replace(moduleRE, '')
// path maybe contain encode chars
const id = decodeURIComponent(ctx.path.replace(moduleRE, ''))
ctx.type = 'js'

const serve = async (id: string, file: string, type: string) => {
Expand Down

0 comments on commit 4e8ffa1

Please sign in to comment.