Bump deps and fix webpack dev mode

This commit is contained in:
SleepWalker
2020-05-20 19:29:48 +03:00
parent 96049ad4ad
commit 39576c0480
9 changed files with 3470 additions and 2324 deletions

View File

@@ -14,6 +14,8 @@
<link rel="shortcut icon" href="<%= htmlWebpackPlugin.files.favicon %>">
<% } %>
<%= htmlWebpackPlugin.tags.headTags %>
<script nonce="edge-must-die">
if (/Edge\/(must die)?/.test(navigator.userAgent)) {
// Edge has a broken fetch implementation, so forcing the polyfill
@@ -31,10 +33,6 @@
<%= require('app/first-render').default %>
<% for (var css in htmlWebpackPlugin.files.css) { %>
<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<% } %>
<% if (htmlWebpackPlugin.options.scripts) {
htmlWebpackPlugin.options.scripts.forEach(function(scriptSrc) {
%>
@@ -43,8 +41,6 @@
});
} %>
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
<% } %>
<%= htmlWebpackPlugin.tags.bodyTags %>
</body>
</html>

View File

@@ -2,50 +2,49 @@
"name": "app",
"version": "1.0.0",
"dependencies": {
"@formatjs/intl-pluralrules": "^1.5.0",
"@formatjs/intl-relativetimeformat": "^4.5.7",
"@hot-loader/react-dom": "^16.11.0",
"@types/react": "^16.9.17",
"@types/react-redux": "^7.1.6",
"@types/react-router-dom": "^5.1.3",
"clsx": "^1.0.4",
"copy-to-clipboard": "^3.0.8",
"@formatjs/intl-pluralrules": "^1.5.9",
"@formatjs/intl-relativetimeformat": "^4.5.16",
"@hot-loader/react-dom": "^16.13.0",
"@types/react": "^16.9.35",
"@types/react-redux": "^7.1.9",
"@types/react-router-dom": "^5.1.5",
"clsx": "^1.1.0",
"copy-to-clipboard": "^3.3.1",
"debounce": "^1.0.0",
"flag-icon-css": "^3.4.5",
"flag-icon-css": "^3.4.6",
"intl": "^1.2.5",
"promise.prototype.finally": "3.1.2",
"prop-types": "^15.6.2",
"raf": "^3.4.1",
"raven-js": "^3.27.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet-async": "^1.0.4",
"react-hot-loader": "^4.12.18",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-helmet-async": "^1.0.6",
"react-intl": "^3.11.0",
"react-motion": "^0.5.0",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-textarea-autosize": "^7.1.2",
"react-transition-group": "^4.3.0",
"react-transition-group": "^4.4.1",
"redux": "^4.0.5",
"redux-localstorage": "^0.4.1",
"redux-thunk": "^2.0.0",
"url-search-params-polyfill": "^7.0.1",
"url-search-params-polyfill": "^8.1.0",
"webfontloader": "^1.6.26",
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@types/debounce": "^1.2.0",
"@types/enzyme": "^3.8.0",
"@types/enzyme": "^3.10.5",
"@types/intl": "^1.2.0",
"@types/promise.prototype.finally": "^2.0.3",
"@types/promise.prototype.finally": "^2.0.4",
"@types/raf": "^3.4.0",
"@types/react-dom": "^16.9.4",
"@types/react-helmet": "^5.0.15",
"@types/react-dom": "^16.9.8",
"@types/react-helmet": "^6.0.0",
"@types/react-motion": "^0.0.29",
"@types/react-transition-group": "^4.2.3",
"@types/webfontloader": "^1.6.29",
"@types/webpack-env": "^1.15.0",
"@types/react-transition-group": "^4.2.4",
"@types/webfontloader": "^1.6.30",
"@types/webpack-env": "^1.15.2",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.15.1"
}

View File

@@ -18,15 +18,20 @@ export function hasStorage(): boolean {
}
class DummyStorage implements Storage {
[name: string]: any;
// FIXME: we can't use this declaration because it breaks react-hot-loader/babel
// [key: string]: any;
readonly length: number;
get length() {
return Object.keys(this).length;
}
getItem(key: string): string | null {
// @ts-ignore
return this[key] || null;
}
setItem(key: string, value: string): void {
// @ts-ignore
this[key] = value;
}