Skip to content

Commit f2db41c

Browse files
fix: pass options to resolve in resolveId hook (#14223)
* fix: pass options to resolve function in resolveId hook * changeset * Update .changeset/shy-cooks-pay.md --------- Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 parent 5542252 commit f2db41c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/shy-cooks-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: pass options to resolve in resolveId hook

packages/kit/src/exports/vite/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,9 @@ async function kit({ svelte_config }) {
558558
// are added to the module graph
559559
enforce: 'pre',
560560

561-
async resolveId(id, importer) {
561+
async resolveId(id, importer, options) {
562562
if (importer && !importer.endsWith('index.html')) {
563-
const resolved = await this.resolve(id, importer, { skipSelf: true });
563+
const resolved = await this.resolve(id, importer, { ...options, skipSelf: true });
564564

565565
if (resolved) {
566566
const normalized = normalize_id(resolved.id, normalized_lib, normalized_cwd);

0 commit comments

Comments
 (0)