Skip to content

Commit

Permalink
fix(script): accept query parameter
Browse files Browse the repository at this point in the history
fixes #1775
  • Loading branch information
manucorporat committed Aug 1, 2019
1 parent 5ebd68c commit 1bf34b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/import-shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const patchEsm = () => {
export const patchBrowser = async (): Promise<d.CustomElementsDefineOptions> => {
// @ts-ignore
const importMeta = import.meta.url;
const regex = new RegExp(`\/${NAMESPACE}(\.esm)?\.js$`);
const regex = new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`);
const scriptElm = Array.from(doc.querySelectorAll('script')).find(s => (
regex.test(s.src) ||
s.getAttribute('data-namespace') === NAMESPACE
Expand Down

0 comments on commit 1bf34b0

Please sign in to comment.