Update frontend

* change root dit and change way to import modules
* update deps to latest versions
* use latest tools for building bundles
* rewrite webpack config
* use nomodule technique for loading modern bundle
* inject polyfills by babel usebuiltins
* update eslint rules
* rename all style files to CSS
* use postcss preset env for building styles
* proper typescript typing
* put all html files to templates folder
* etc
This commit is contained in:
Pavel Mineev
2021-01-12 13:39:26 -06:00
committed by Umputun
parent 919fb7af62
commit 5825a55b69
325 changed files with 10488 additions and 18795 deletions
+5 -3
View File
@@ -1,6 +1,8 @@
/** converts widnow.location.search into object */
export default function parseQuery(search: string = window.location.search) {
if (search.length < 2) return {};
export default function parseQuery<T extends {}>(search: string = window.location.search): T {
if (search.length < 2) {
return {} as T;
}
return search
.substr(1)
@@ -12,5 +14,5 @@ export default function parseQuery(search: string = window.location.search) {
...accum,
[key]: value ? decodeURIComponent(value) : '',
};
}, {} as Record<string, string>);
}, {} as T);
}