Skip to content

Commit 31071bd

Browse files
Tensai75aklinker1
andauthored
feat: ignore elements with a vite-ignore or wxt-ignore attribute (#1603)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
1 parent f5619f6 commit 31071bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/wxt/src/core/builders/vite/plugins/devHtmlPrerender.ts

+7
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ export function pointToDevServer(
150150
attr: string,
151151
) {
152152
document.querySelectorAll(querySelector).forEach((element) => {
153+
if (
154+
element.hasAttribute('vite-ignore') ||
155+
element.hasAttribute('wxt-ignore')
156+
) {
157+
element.removeAttribute('wxt-ignore');
158+
return;
159+
}
153160
const src = element.getAttribute(attr);
154161
if (!src || isUrl(src)) return;
155162

0 commit comments

Comments
 (0)