Skip to content

[9.x] Output only unique asset / preload tags - #45404

Merged
taylorotwell merged 3 commits into
laravel:9.xfrom
timacdonald:unique-vite-preloads
Dec 23, 2022
Merged

taylorotwell merged 3 commits into
laravel:9.xfrom
timacdonald:unique-vite-preloads

Conversation

@timacdonald

Copy link
Copy Markdown
Member

It is currently possible, depending on your Vite configuration, to have the @vite directive output duplicate standard script / stylesheet tags in addition to asset preload tags.

These additional tags are ignored by the browser, however it is nice to not have duplicate tags output into the source, so we just "unique" the tags and preloads before outputting them both.

@timacdonald timacdonald changed the title [9.x] Unique vite assets [9.x] Output only unique asset / preload tags Dec 22, 2022
@taylorotwell
taylorotwell merged commit bfab0d5 into laravel:9.x Dec 23, 2022
@timacdonald
timacdonald deleted the unique-vite-preloads branch January 10, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants