Skip to content

Commit

Permalink
Add crossorigin="anonymous" to development css links (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrjoniec authored May 14, 2024
1 parent a0344e4 commit 0490dc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/vite-plugin-shopify/src/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const viteTagSnippetDev = (assetHost: string, entrypointsDir: string, reactPlugi
<script src="${assetHost}/@id/__x00__vite-plugin-shopify:react-refresh" type="module"></script>`}
<script src="${assetHost}/@vite/client" type="module"></script>
{% if is_css == true %}
{{ file_url | stylesheet_tag }}
<link rel="stylesheet" href="{{ file_url }}" crossorigin="anonymous">
{% else %}
<script src="{{ file_url }}" type="module"></script>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`vite-plugin-shopify:html > builds out .liquid files for development 1`]
%}
<script src=\\"http://localhost:5173/@vite/client\\" type=\\"module\\"></script>
{% if is_css == true %}
{{ file_url | stylesheet_tag }}
<link rel=\\"stylesheet\\" href=\\"{{ file_url }}\\" crossorigin=\\"anonymous\\">
{% else %}
<script src=\\"{{ file_url }}\\" type=\\"module\\"></script>
{% endif %}
Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`vite-plugin-shopify:html > builds out .liquid files for development wit
<script src=\\"http://localhost:5173/@id/__x00__vite-plugin-shopify:react-refresh\\" type=\\"module\\"></script>
<script src=\\"http://localhost:5173/@vite/client\\" type=\\"module\\"></script>
{% if is_css == true %}
{{ file_url | stylesheet_tag }}
<link rel=\\"stylesheet\\" href=\\"{{ file_url }}\\" crossorigin=\\"anonymous\\">
{% else %}
<script src=\\"{{ file_url }}\\" type=\\"module\\"></script>
{% endif %}
Expand Down

0 comments on commit 0490dc4

Please sign in to comment.