We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google ChromeのDeveloper Toolsを開いていると、preloadをしたリソースが使われていないという警告が表示されてしまう。
これはscript要素はcrossorigin="anonymous"だが、preloadのためのlink要素はcrossorigin属性が無指定になってしまっているために起きているものと思われる。
script
crossorigin="anonymous"
link
crossorigin
The text was updated successfully, but these errors were encountered:
load
integrity
の二点のIssueが関係している模様。
preload-webpack-pluginとGoogle Chrome両方の修正を待たなければならないと思われる。
preload-webpack-plugin
Sorry, something went wrong.
警告とは言えconsole表示されているのは精神衛生上よろしくないので早めに対処したい。
console
とりいそぎはcrossorigin属性とintegrity属性をなくせば解決できるはずである。極めて不本意ではあるが、v3.0.0までにはなんとかなっていて欲しい。
v3.0.0
Remove crossorigin attribute for production environment Close #279
140892e
dynamic importで切り出したスクリプトファイルを呼び出す際に、 `script`要素に`crossorigin`属性を追加するのを止める。 `crossorigin`属性を持つ`script`要素を`preload`させる場合は `rel`属性の値を`preload`にした`link`要素にも`crossorigin`属性を追加させなければならない。 `preload-webpack-plugin`はv1.2.1現在、`crossorigin`属性の追加には対応していない。 そのため、`preload-webpack-plugin`を使っている限りは`crossorigin`属性を`script`要素に足せない。 また`crossorigin`属性と同様に`integrity`属性を持っている場合も同様である。 ただし`link`要素は`rel`属性の値が`stylesheet`の時以外は`integrity`属性を持たせることはできない。 仕様にない動作であるため、当然 ウェブブラウザーからも適切に認識されることはない。 `crossorigin`属性の値が`anonymous`でない場合は`integrity`属性を持たせられないため、 `preload-webpack-plugin`が`crossorigin`属性の追加に対応していない時点で `integrity`属性の追加もできなくなっているのではあるが、 非常に残念でならない。 これは敗北のコミットである。
eeef661
ykzts
No branches or pull requests
Google ChromeのDeveloper Toolsを開いていると、preloadをしたリソースが使われていないという警告が表示されてしまう。
これは
script
要素はcrossorigin="anonymous"
だが、preloadのためのlink
要素はcrossorigin
属性が無指定になってしまっているために起きているものと思われる。The text was updated successfully, but these errors were encountered: