We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d78ae7 commit 5d1d81eCopy full SHA for 5d1d81e
packages/vite/src/node/plugins/importAnalysis.ts
@@ -478,7 +478,9 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
478
const [url, resolvedId] = await normalizeUrl(specifier, start)
479
480
// record as safe modules
481
- server?.moduleGraph.safeModulesPath.add(fsPathFromUrl(url))
+ const urlWithoutBase =
482
+ base !== '/' && url.startsWith(base) ? url.replace(base, '/') : url
483
+ server?.moduleGraph.safeModulesPath.add(fsPathFromUrl(urlWithoutBase))
484
485
if (url !== specifier) {
486
let rewriteDone = false
0 commit comments