/vue-to-astro

Automatically convert Vue template syntax to Astro.

Primary LanguageTypeScript

Project Logo

Vue to Astro Converter

Automatically convert Vue template syntax to Astro.
View Demo · Report Bug · Request Feature

A simple, browser-based conversion tool which transforms a Vue SFC's <template> block into valid Astro JSX. This makes the process of migrating content-heavy Vue sites to Astro much more pleasant.

Usage

  1. Visit the demo
  2. Paste the code for a Vue component in the left pane
  3. See the equivalent Astro template in the right pane

Deployment

pnpm install
pnpm run build

You can deploy the produced dist folder to any static host provider (netlify, surge, now, etc.) or serve it using a web server.

Contributing

  1. Fork this repo
  2. Clone your fork
  3. Install dependencies --- pnpm install
  4. Start the development server --- pnpm dev
  5. Make some changes
  6. Submit your changes by pushing them to a well-named branch in your fork, then creating a PR

Acknowledgments

  • @vue/compiler-sfc --- Parsing and transforming Vue SFC syntax
  • prettier-plugin-astro --- Pretty-printing Astro syntax