-
-
Notifications
You must be signed in to change notification settings - Fork 372
fix: Promise pollyfil loaded before webpack bundle #127
New issue
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
Changes from 1 commit
119eb45
b81227a
6395e3a
9532636
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| <% } %> | ||
| <% for (var chunk of webpack.chunks) { %> | ||
| <% for (var file of chunk.files) { %> | ||
| <% if (htmlWebpackPlugin.options.preload && file.match(/\.(js|css)$/)) { %> | ||
| <% if (htmlWebpackPlugin.options.preload && file.match(/\.(js|css)$/) && file !== 'polyfills.js') { %> | ||
| <link rel="preload" href="<%= htmlWebpackPlugin.files.publicPath + file %>" as="<%= file.match(/\.css$/)?'style':'script' %>"> | ||
| <% } else if (file.match(/manifest\.json$/)) { %> | ||
| <link rel="manifest" href="<%= htmlWebpackPlugin.files.publicPath + file %>"> | ||
|
|
@@ -24,5 +24,6 @@ | |
| <%= htmlWebpackPlugin.options.ssr({ | ||
| url: '/' | ||
| }) %> | ||
| <script>"undefined"==typeof fetch&&document.write('<script src="<%= htmlWebpackPlugin.files.publicPath + "polyfills.js" %>"><\/script>')</script> | ||
|
||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you ignore this because all
serviceWorker-compatible browsers don't need afetchorPromisepolyfill?(^ I'm not certain that that's 100% true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand
serviceWorkerimplementation requiresfetchimplementation which in turn requiresPromiseimplementation. Based on FetchEvent. I could be wrong tough.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. I believe that's the case too 👍 You upgraded my 90% certainty to 95% 😉