Skip to content

Commit

Permalink
fix: decodeURIComponent for module resolve (#393)
Browse files Browse the repository at this point in the history
fix #392
  • Loading branch information
underfin authored Jun 18, 2020
1 parent e1f8d93 commit 91f696b
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 @@ -27,7 +27,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 91f696b

Please sign in to comment.