11 lines
218 B
JavaScript
11 lines
218 B
JavaScript
|
const files = import.meta.globEager('./*.js');
|
||
|
let api = {};
|
||
|
Object.keys(files).forEach((key) => {
|
||
|
api = {
|
||
|
...api,
|
||
|
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
|
||
|
};
|
||
|
});
|
||
|
|
||
|
export default api;
|