Not sure why this isn't working. I used to have
// file 1
import Box from '@/components/Box'
import Popup from '@/components/Popup'
const MDXComponents = {
Box,
Popup
}
// using MDXComponents somewhere in file 1
Now I want to outsource the MDXComponents object, as it is getting too big. So I created a new file:
// file 2
import Box from '@/components/Box'
import Popup from '@/components/Popup'
export default {
Box,
Popup
}
And then back in file 1 I do:
// file 1
import * as MDXComponents from './file2'
// using MDXComponents somewhere in file 1
It doesn't let me do this, but I am not sure why?