Skip to content

Commit

Permalink
feat: dedupe scripts and links
Browse files Browse the repository at this point in the history
  • Loading branch information
LuLaValva committed Aug 27, 2024
1 parent c9c38d6 commit ab7ea4c
Show file tree
Hide file tree
Showing 29 changed files with 629 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
<link
crossorigin=""
href="/assets/modulepreload-[hash].js"
rel="modulepreload"
/>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
<link
crossorigin=""
href="/assets/modulepreload-[hash].js"
rel="modulepreload"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
<link
crossorigin=""
href="/assets/modulepreload-[hash].js"
rel="modulepreload"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
<link
crossorigin=""
href="/assets/modulepreload-[hash].js"
rel="modulepreload"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script
async=""
crossorigin=""
src="/assets/class-[hash].marko-[hash].js"
type="module"
/>
<link
crossorigin=""
href="/assets/modulepreload-[hash].js"
rel="modulepreload"
/>
<div
id="clickable"
>
Mounted: true Clicks: 1
</div>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<script
src="/@vite/client"
type="module"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<script
src="/@vite/client"
type="module"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<script
async=""
blocking="render"
class="marko-vite-preload"
type="module"
>
import "/@vite/client";import "/src/components/class-[hash].marko?marko-browser-entry";document.querySelectorAll('.marko-vite-preload').forEach((el) =&gt; el.remove());document.documentElement.style.visibility='';if(document.documentElement.getAttribute('style')==='')document.documentElement.removeAttribute('style');
</script>
<script
class="marko-vite-preload"
>
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<div
id="clickable"
>
Mounted: false Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<div
id="clickable"
>
Mounted: true Clicks: 0
</div>
Loading

0 comments on commit ab7ea4c

Please sign in to comment.