Skip to content

Commit

Permalink
change esm preload rel to modulepreload
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay committed Mar 16, 2021
1 parent 84cb305 commit a2e1daf
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/optimizer/lib/transformers/RewriteAmpUrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class RewriteAmpUrls {
as: 'script',
crossorigin: 'anonymous',
href: esmScriptUrl,
rel: 'preload',
rel: 'modulepreload',
});
insertBefore(scriptNode.parent, preload, scriptNode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<script async nomodule src="https://cdn.ampproject.org/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="https://cdn.ampproject.org/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="modulepreload">
<script async nomodule src="https://cdn.ampproject.org/v0.js"></script>
<script async src="https://cdn.ampproject.org/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="amp-geo-api" content="/geo">
<script async nomodule src="https://cdn.ampproject.org/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="https://cdn.ampproject.org/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="modulepreload">
<script async nomodule src="https://cdn.ampproject.org/v0.js"></script>
<script async src="https://cdn.ampproject.org/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<script async nomodule src="https://cdn.ampproject.org/lts/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="https://cdn.ampproject.org/lts/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/lts/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/lts/v0.mjs" rel="modulepreload">
<script async nomodule src="https://cdn.ampproject.org/lts/v0.js"></script>
<script async src="https://cdn.ampproject.org/lts/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/lts/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<script async nomodule src="https://cdn.ampproject.org/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="https://cdn.ampproject.org/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/v0.mjs" rel="modulepreload">
<script async nomodule src="https://cdn.ampproject.org/v0.js"></script>
<script async src="https://cdn.ampproject.org/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<script async nomodule src="https://cdn.ampproject.org/rtv/001515617716922/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="https://cdn.ampproject.org/rtv/001515617716922/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/rtv/001515617716922/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="https://cdn.ampproject.org/rtv/001515617716922/v0.mjs" rel="modulepreload">
<script async nomodule src="https://cdn.ampproject.org/rtv/001515617716922/v0.js"></script>
<script async src="https://cdn.ampproject.org/rtv/001515617716922/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/rtv/001515617716922/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="runtime-host" content="/amp">
<script async nomodule src="/amp/rtv/001515617716922/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="/amp/rtv/001515617716922/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="/amp/rtv/001515617716922/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="/amp/rtv/001515617716922/v0.mjs" rel="modulepreload">
<script async nomodule src="/amp/rtv/001515617716922/v0.js"></script>
<script async src="/amp/rtv/001515617716922/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/amp/rtv/001515617716922/v0.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="runtime-host" content="/amp">
<script async nomodule src="/amp/v0/amp-experiment-0.1.js"></script>
<script async custom-element="amp-experiment" src="/amp/v0/amp-experiment-0.1.mjs" type="module" crossorigin="anonymous"></script>
<link as="script" crossorigin="anonymous" href="/amp/v0.mjs" rel="preload">
<link as="script" crossorigin="anonymous" href="/amp/v0.mjs" rel="modulepreload">
<script async nomodule src="/amp/v0.js"></script>
<script async src="/amp/v0.mjs" type="module" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/amp/v0.css">
Expand Down

0 comments on commit a2e1daf

Please sign in to comment.