salix/front/module-import.js

27 lines
1.1 KiB
JavaScript
Executable File

export default function moduleImport(moduleName) {
// TODO: Webpack watches module backend files when using dynamic import
//return import(
// /* webpackInclude: /modules\/[a-z0-9-]+\/front\/index.js$/ */
// '../modules/'+ moduleName +'/front/index.js'
//);
switch(moduleName) {
case 'client' : return import('client/front');
case 'item' : return import('item/front');
case 'ticket' : return import('ticket/front');
case 'order' : return import('order/front');
case 'claim' : return import('claim/front');
case 'zone' : return import('zone/front');
case 'travel' : return import('travel/front');
case 'worker' : return import('worker/front');
case 'invoiceOut' : return import('invoiceOut/front');
case 'invoiceIn' : return import('invoiceIn/front');
case 'route' : return import('route/front');
case 'entry' : return import('entry/front');
case 'account' : return import('account/front');
case 'supplier' : return import('supplier/front');
case 'monitor' : return import('monitor/front');
}
}