Skip to content

Commit 1bf34b0

Browse files
committed
fix(script): accept query parameter
fixes #1775
1 parent 5ebd68c commit 1bf34b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/import-shims.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const patchEsm = () => {
1515
export const patchBrowser = async (): Promise<d.CustomElementsDefineOptions> => {
1616
// @ts-ignore
1717
const importMeta = import.meta.url;
18-
const regex = new RegExp(`\/${NAMESPACE}(\.esm)?\.js$`);
18+
const regex = new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`);
1919
const scriptElm = Array.from(doc.querySelectorAll('script')).find(s => (
2020
regex.test(s.src) ||
2121
s.getAttribute('data-namespace') === NAMESPACE

0 commit comments

Comments
 (0)