Verified Commit 5c049ace authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Add dynamic imports (performance boost)

parent f9033f63
import m from 'mithril';
import animateScrollTo from 'animated-scroll-to';
import { List, Shadow, ListTile, Button, Icon } from 'polythene-mithril';
import { Spinner } from 'amiv-web-ui-components';
import { List } from 'polythene-mithril-list';
import { Shadow } from 'polythene-mithril-shadow';
import { ListTile } from 'polythene-mithril-list-tile';
import { Button } from 'polythene-mithril-button';
import { Icon } from 'polythene-mithril-icon';
import Spinner from 'amiv-web-ui-components/src/spinner';
import { error } from '../models/log';
import { i18n, currentLanguage } from '../models/language';
import { FilterView } from '../components';
import FilterView from '../components/FilterView';
import icons from '../images/icons';
const LIST_LOADING = 'loading';
......
import m from 'mithril';
import { apiUrl } from 'config';
import { Card } from 'polythene-mithril';
import { Spinner } from 'amiv-web-ui-components';
import { EventCard } from '../components';
import { EventController } from '../models/events';
import { JobofferController } from '../models/joboffers';
import { Card } from 'polythene-mithril-card';
import Spinner from 'amiv-web-ui-components/src/spinner';
import EventCard from '../components/EventCard';
import EventController from '../models/events/EventController';
import JobofferController from '../models/joboffers/JobofferController';
import { i18n, currentLanguage } from '../models/language';
import icons from '../images/icons';
......
......@@ -4,7 +4,7 @@ import { mainNavigation } from '../models/navigation';
import logos from '../images/logos';
import icons from '../images/icons';
import { i18n, currentLanguage, changeLanguage } from '../models/language';
import { Button } from '../components';
import Button from '../components/Button';
import { isLoggedIn, login } from '../models/auth';
let mobileMenuShowing = false;
......
......@@ -2,7 +2,7 @@ import m from 'mithril';
import marked from 'marked';
import escape from 'html-escape';
import { apiUrl } from 'config';
import { Button } from 'polythene-mithril';
import { Button } from 'polythene-mithril-button';
import { i18n } from '../../models/language';
export default class JobofferDetails {
......
import m from 'mithril';
import { apiUrl } from 'config';
import { ExpansionPanel } from 'amiv-web-ui-components';
import ExpansionPanel from 'amiv-web-ui-components/src/expansionPanel';
import { i18n } from '../../models/language';
import { JobofferController } from '../../models/joboffers';
import { FilteredListPage, FilteredListDataStore } from '../filteredListPage';
......
import m from 'mithril';
import { Dialog } from 'polythene-mithril';
import { Dialog } from 'polythene-mithril-dialog';
import header from './header';
import footer from './footer';
......
import m from 'mithril';
import marked from 'marked';
import { apiUrl } from 'config';
import { Dialog, Icon } from 'polythene-mithril';
import { Dialog } from 'polythene-mithril-dialog';
import { Icon } from 'polythene-mithril-icon';
import { log } from '../../models/log';
import { i18n } from '../../models/language';
import { Button, TextField } from '../../components';
import Button from '../../components/Button';
import TextField from '../../components/TextField';
import icons from '../../images/icons';
import { Infobox } from '../errors';
......
import m from 'mithril';
import { i18n } from '../../models/language';
import { Button } from '../../components';
import Button from '../../components/Button';
/**
* NewsletterSubscriptionForm class
......
import m from 'mithril';
import { i18n } from '../../models/language';
import { Button, TextField } from '../../components';
import Button from '../../components/Button';
import TextField from '../../components/TextField';
// provides a form to change the users rfid
export default class RfidForm {
......
import m from 'mithril';
import { i18n } from '../../models/language';
import { Button } from '../../components';
import Button from '../../components/Button';
// provides a button to terminate all other sessions.
export default class SessionInfo {
oninit(vnode) {
this.userController = vnode.attrs.userController;
}
submit() {
this.busy = true;
this.userController
......
import m from 'mithril';
import { apiUrl } from 'config';
import { i18n } from '../../models/language';
import { Button } from '../../components';
import Button from '../../components/Button';
export default class StudydocDetails {
oninit(vnode) {
......
import m from 'mithril';
import marked from 'marked';
import { apiUrl } from 'config';
import { ExpansionPanel } from 'amiv-web-ui-components';
import { Dialog, Button } from 'polythene-mithril';
import ExpansionPanel from 'amiv-web-ui-components/src/expansionPanel';
import { Dialog } from 'polythene-mithril-dialog';
import { Button } from 'polythene-mithril-button';
import StudydocsController from '../../models/studydocs';
import { lectures } from '../studydocs/lectures';
import { lectures } from './lectures';
import { i18n, currentLanguage } from '../../models/language';
import { FilteredListDataStore, FilteredListPage } from '../filteredListPage';
......
import m from 'mithril';
import marked from 'marked';
import StudydocsController from '../../models/studydocs';
import { Button, Dropdown, TextField, FileInput } from '../../components';
import Button from '../../components/Button';
import Dropdown from '../../components/Dropdown';
import TextField from '../../components/TextField';
import FileInput from '../../components/FileInput';
import { currentLanguage, i18n } from '../../models/language';
export default class studydocNew {
......
......@@ -36,7 +36,10 @@ const config = {
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', { targets: 'last 2 years' }]],
plugins: ['@babel/plugin-proposal-object-rest-spread'],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
],
},
},
],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment