You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const modules = import.meta.glob('./dir/*.js', { as: 'raw', eager: true })
// code produced by vite
const modules = {
'./dir/foo.js': 'export default "foo"\n',
'./dir/bar.js': 'export default "bar"\n',
}
So I think maybe there is a way to export all from a folder like:
// sample
const modules = import.meta.glob('./modules/*.js',{...})
maybeSomeFuntion(modules)
// code produced by vite
export * from './modules/a.js'
export * from './modules/b.js'
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Docs said:
So I think maybe there is a way to export all from a folder like:
Beta Was this translation helpful? Give feedback.
All reactions