Skip to content

Commit

Permalink
Add IE11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
clairezed authored and LucienMLD committed Feb 4, 2021
1 parent 6800af3 commit cf2abf2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
defaults
> 1%
Chrome >= 50
Edge >= 14
Firefox >= 50
Opera >= 40
Safari >= 8
iOS >= 8
IE >= 11
4 changes: 4 additions & 0 deletions app/front/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

// Compatibilité navigateurs anciens dont IE11
import "core-js/stable";
import "whatwg-fetch";

require("@rails/ujs").start();
require("turbolinks").start();

Expand Down
4 changes: 4 additions & 0 deletions app/front/packs/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

// Compatibilité navigateurs anciens dont IE11
import "core-js/stable";
import "whatwg-fetch";

require("@rails/ujs").start();

require("jquery");
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/pages.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
= csrf_meta_tags
= stylesheet_link_tag 'pages'
= stylesheet_pack_tag 'pages', media: 'all'
= javascript_include_tag 'pages'
= javascript_pack_tag 'pages'
= stylesheet_pack_tag 'pages', media: 'all'
= javascript_include_tag 'https://browser.sentry-cdn.com/4.6.4/bundle.min.js', crossorigin: 'anonymous'

= render 'favicon'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"accessible-autocomplete": "^2.0.3",
"expose-loader": "^1.0.1",
"jquery": "^3.5.1",
"turbolinks": "^5.2.0"
"turbolinks": "^5.2.0",
"whatwg-fetch": "^3.5.0"
},
"devDependencies": {
"eslint": "^7.14.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7880,6 +7880,11 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==

whatwg-fetch@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz#605a2cd0a7146e5db141e29d1c62ab84c0c4c868"
integrity sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A==

which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
Expand Down

0 comments on commit cf2abf2

Please sign in to comment.