Skip to content

Commit 554b107

Browse files
committed
docs
1 parent 2a3a9c2 commit 554b107

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ $tags = $vite->createTags("index.ts");
4545

4646
Your entry point scripts are defined in Vite's [`build.rollupOptions`](https://vitejs.dev/config/build-options#build-rollupoptions) using RollUp's [`input`](https://rollupjs.org/configuration-options/#input) setting.
4747

48+
Note that, if you have **multiple entry point scripts** on **the same page**, you should pass them in a *single* call - for example:
49+
50+
```php
51+
$tags = $vite->createTags("index.ts", "consent-banner.ts");
52+
```
53+
54+
Making multiple calls for different entry points *may* result in duplicate tags for any shared static imports - you will most likely need just *one* instance of `Tags` on a single page.
55+
4856
#### 3. Emit from `Tags` in your HTML template:
4957

5058
Your `Tags` instance contains the `preload` and `css` tags, which should be emitted in

0 commit comments

Comments
 (0)