Closed jcayzac closed 3 years ago
thank you for the repo, I didn't realize it. I'll take a look.
understood. Your slide has <div class="codepen" data-height="265" data-theme-id="light" data-default-tab="result" data-user="jcayzac" data-slug-hash="MWbOqbE" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Gitgraph.js starter">
but MDX doesn't allow style="height: 265px"
. Currently, fusuma doesn't transform from style="height: 265px"
to style={{ height: "265px" }}
.
Oh I'm so sorry… I must have added that before I left that code for a while and came back to update fusuma… Thank you very much for checking! By the way, I really like Fusuma. It's small and simple. If you're taking suggestions, I would like to suggest:
Great job so far, tho!
@jcayzac I'll add a converter from HTML to React Component so the HTML code will run on Fusuma soon!
Thank you for your suggestion.
Removing Webpack. It's antique and depends on Babel, which was fine 5 years ago. Rollup+ESbuild are much, much more efficient. MDX 2.0 also finally removes its dependency on Babel too (to rely on espree instead). Maybe also have a look at Vitejs?
Yeah, your suggestion makes sense but we have some issues. For example, if we use vite, vite won't support definePlugin(not a replacement, just add values(via define) to window
object so we can't support require.context
to collect slides.)
I'll investigate some issues to replace the bundler in the future.
@hiroppy vite supports dynamic imports as well as import.meta.glob
. since it's based on ES module, require
isn't supported.
yes, vite supports import.meta.glob
but if we use variables for it, vite will have errors. Like this. https://github.com/hiroppy/fusuma/blob/master/packages/client/src/entryPoints/Client.js#L22
Users can change the path of the slides so we can't specify the glob value directly.
Info
Type
For Bugs
I just updated my dependencies. When I start the development server, I can't get the slides to show and the console is full of errors:
How can we reproduce the behavior?
I put up a repro repository at https://github.com/jcayzac/fusuma-bug