Skip to content

Commit

Permalink
fix(ssr): ignore base when normalizing urls for ssr
Browse files Browse the repository at this point in the history
fix #1995
  • Loading branch information
yyx990803 committed Feb 13, 2021
1 parent 4f41231 commit 26d409b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
e.pos = pos
throw e
}

// prepend base (dev base is guaranteed to have ending slash)
url = base + url.replace(/^\//, '')
}

// prepend base (dev base is guaranteed to have ending slash)
url = base + url.replace(/^\//, '')
return [url, resolved.id]
}

Expand Down

0 comments on commit 26d409b

Please sign in to comment.