ElMassimo / iles

🏝 The joyful site generator
https://iles.pages.dev
MIT License
1.08k stars 31 forks source link

performance: skip vue-jsx babel transform when converting MDX to Vue Components #32

Closed ElMassimo closed 2 years ago

ElMassimo commented 2 years ago

Description 📖

This pull request uses a new recma-based transform which skips the need for Babel, making the transform two to five times faster depending on the document.

recma-vue-component

Wraps JSX elements into the render function of a defineComponent, which is the default export.

recma-vue-jsx-build

Converts JSX elements into createVNode calls.

It also detects which components have not been locally defined or imported, and uses resolveComponent calls, enabling support for global components (and automatic resolution using unplugin-vue-components).

netlify[bot] commented 2 years ago

✔️ Deploy Preview for iles-docs canceled.

🔨 Explore the source changes: 58553057a128c87635a1e1c3407a5859d590bfc2

🔍 Inspect the deploy log: https://app.netlify.com/sites/iles-docs/deploys/6189d827261a3f0007fd5fef

netlify[bot] commented 2 years ago

✔️ Deploy Preview for the-vue-point-with-iles canceled.

🔨 Explore the source changes: 58553057a128c87635a1e1c3407a5859d590bfc2

🔍 Inspect the deploy log: https://app.netlify.com/sites/the-vue-point-with-iles/deploys/6189d827c3be32000736c8c2