bfanger / svelte-preprocess-react

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

Add viteCommonjs to the docs #7

Closed bfanger closed 2 years ago

bfanger commented 2 years ago

The node_modules/react-dom/client.js contains common-js, vite (or sveltekit) failed to convert it to esm.

bfanger commented 2 years ago

Since 0.5.0 the import { createElement } from 'react'; is compiled into the application code instead of the library. Dependency injection: React & ReactDOM are now arguments to the sveltifyReact function.

This fixes errors like: node_modules/react-dom/client.js does not provide an export named 'default'