From 11e728a61a4f036294c1d4e3fcf086e4ebcbf757 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Fri, 10 May 2024 16:02:51 -0400 Subject: [PATCH] document handling query params for theme pack plugin local dev --- www/pages/guides/theme-packs.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/pages/guides/theme-packs.md b/www/pages/guides/theme-packs.md index 78cf4f2e6..18c475995 100644 --- a/www/pages/guides/theme-packs.md +++ b/www/pages/guides/theme-packs.md @@ -170,8 +170,11 @@ class MyThemePackDevelopmentResource extends ResourceInterface { async resolve(url) { const { userWorkspace } = this.compilation.context; const filePath = this.getBareUrlPath(url).split(`/node_modules/${packageName}/dist/`)[1]; + const params = searchParams.size > 0 + ? `?${searchParams.toString()}` + : ''; - return new URL(`./${filePath}`, userWorkspace, filePath); + return new URL(`./${filePath}${params}`, userWorkspace, filePath); } }