jxnblk / mdx-deck

♠️ React MDX-based presentation decks
https://mdx-deck.jxnblk.com
MIT License
11.34k stars 603 forks source link

Why doesn't theme re-exporting work? #553

Open borekb opened 4 years ago

borekb commented 4 years ago

The docs show two approaches how to import and set a theme:

1. (e.g. here):

import { themes } from 'mdx-deck';
export const theme = themes.dark;

2. (e.g. here):

import { dark } from 'mdx-deck/themes';
export const theme = dark;

I'm wondering why this doesn't work:

export { dark as theme } from 'mdx-deck/themes';

It's even in the homepage's GIF but I guess it's no longer supported. Out of curiosity, what's the technical reason? I'd prefer this one-liner 😄.

jxnblk commented 4 years ago

This is currently a limitation with MDX, which I believe will be resolved in a future version