eidellev / inertiajs-adonisjs

279 stars 17 forks source link

Unexpected token '<' #68

Closed treboryx closed 2 years ago

treboryx commented 2 years ago

Anyone getting this error when adding the following in inertia config?

  ssr: {
    enabled: true,
    mode: 'react', // can also be 'vue2', 'vue3', 'svelte'
    pageRootDir: 'js/pages', // Where inertia should look for page components
  }

Without it, all good, but no SSR.

eidellev commented 2 years ago

Hey @treboryx ! This is probably because you don't have jsx enabled in your tsconfig.json this way this currently works is that inertia relies on adonis's tsconfig when rendering things on the server. This may change in the future, but i'll update the docs just in case.

Feel free to reopen if this doesn't fork for you.