Skip to content
Discussion options

You must be logged in to vote

Nothing official yet, but this works today with a small Babel plugin. makeAutoObservable already infers generator methods as flow, so the transform only has to rewrite async/await to */yield. Note that @vitejs/plugin-react 6 removed its babel option, so in Vite 8 Babel plugins go through @rolldown/plugin-babel.

npm i -D @rolldown/plugin-babel @babel/core

// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import babel from '@rolldown/plugin-babel'
import mobxAsyncFlow from './mobx-async-flow.js'

export default defineConfig({
  plugins: [
    react(),
    babel({
      presets: [{
        preset: () => ({ plugins: [mobxAsyncFlow] }),
        // o…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kubk
Comment options

kubk Oct 13, 2026
Maintainer

@dgesteves
Comment options

Answer selected by khokm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants