bfanger / svelte-preprocess-react

Seamlessly use React components inside a Svelte app
MIT License
126 stars 6 forks source link

Compile Error on svelte5 #34

Closed ryoppippi closed 7 months ago

ryoppippi commented 7 months ago

When we use this with svelte5 this causes an error

1:58:10 PM [vite] Internal server error: /Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/projects/v2/src/App.svelte Error while preprocessing /Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/projects/v2/src/App.svelte - Invalid compiler option: The errorMode option has been removed. If you are using this through svelte-preprocess with TypeScript, use the https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax setting instead
  Plugin: vite-plugin-svelte
  File: /Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/projects/v2/src/App.svelte
      at error (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/errors.js:527:8)
      at file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/validate-options.js:144:4
      at file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/validate-options.js:214:18
      at compile (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/index.js:22:21)
      at transform (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte-preprocess-react@0.16.0_react-dom@18.2.0_react@18.2.0_svelte@5.0.0-next.40/node_modules/svelte-preprocess-react/dist/preprocessReact.js:115:20)
      at markup (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte-preprocess-react@0.16.0_react-dom@18.2.0_react@18.2.0_svelte@5.0.0-next.40/node_modules/svelte-preprocess-react/dist/preprocessReact.js:51:27)
      at process_markup (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/preprocess/index.js:312:26)
      at Module.preprocess (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/svelte@5.0.0-next.40/node_modules/svelte/src/compiler/preprocess/index.js:359:31)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async compileSvelte (file:///Users/kimura_ryotaro/ghq/github.com/notahotel/notahotel-zapp/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@3.0.1_svelte@5.0.0-next.40_vite@5.0.12/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js:96:20)
bfanger commented 7 months ago

Svelte 5 isn't released yet and is not yet supported by this preprocessor

I've started work in the svelte5 branch, but its still in its early stages

ryoppippi commented 7 months ago

Oh, okay, thanks!!

bfanger commented 7 months ago

Beta is available: svelte-preprocess-react@2.0.0-beta.0

ryoppippi commented 7 months ago

Thanks!!! I'll give it a try!!