Skip to content

Commit

Permalink
Merge pull request Expensify#2722 from kidroca/kidroca/add-polyfill.io
Browse files Browse the repository at this point in the history
feature: Include polyfill.io for web builds
  • Loading branch information
Julesssss authored May 7, 2021
2 parents 56cefb7 + 1494e3f commit 99fe0ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const webpackConfig = {
new HtmlWebpackPlugin({
template: 'web/index.html',
filename: 'index.html',
usePolyfillIO: platform === 'web',
}),

// Copies favicons into the dist/ folder to use for unread status
Expand Down
4 changes: 4 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
</style>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<link rel="shortcut icon" id="favicon" href="/favicon.png">
<% if (htmlWebpackPlugin.options.usePolyfillIO) { %>
<!-- polyfill.io is only needed on Web to support older browsers. It should not be loaded for desktop -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=default%2CResizeObserver&flags=gated"></script>
<% } %>
</head>
<body>
<div style="position: absolute; top: 0; left: 0; right: 0; height: 30px;" id="drag-area"></div>
Expand Down

0 comments on commit 99fe0ae

Please sign in to comment.