Skip to content

Commit

Permalink
refactor: Get rid of the polyfill bundle suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
HenadzV committed Mar 15, 2023
1 parent 756d531 commit 287339a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions docs/BROWSER_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Exadel Smart Library does not have dependencies but uses the following list of n
- [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
- [Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)

All of them are fully supported by modern browsers such as Chrome, Firefox, Safari or Edge (>43).
All of them are fully supported by modern browsers such as Chrome, Firefox, Safari (>13) or Edge (>43).

In order to make ESL work in older browsers, you can use a "light" polyfills list (for older versions Safari).

See more details on what polyfill approach might look like in the demo pages source code.
In order to make ESL work in older browsers, you can use polyfill (for older versions of Safari).
File renamed without changes.
4 changes: 1 addition & 3 deletions pages/views/_includes/polyfill.njk
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script>
(function () {
var version = '';
if (!window.scrollBy || !window.ResizeObserver) {
version = 'light';
document.write('<script type="text/javascript" src="{{ '/bundles/polyfill.js' | url }}"><\/script>');
}
(version) && document.write('<script type="text/javascript" src="{{ '/bundles/polyfill-' | url }}' + version + '.js"><\/script>');
})();
</script>
2 changes: 1 addition & 1 deletion pages/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
devtool: 'source-map',
entry: {
'localdev': './src/localdev.ts',
'polyfill-light': './src/polyfill-light.ts'
'polyfill': './src/polyfill.ts'
},
resolve: {
modules: ['../node_modules'],
Expand Down

0 comments on commit 287339a

Please sign in to comment.