Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "render is not a function" #191

Closed
PierBover opened this issue Jul 5, 2021 · 2 comments
Closed

Error: "render is not a function" #191

PierBover opened this issue Jul 5, 2021 · 2 comments

Comments

@PierBover
Copy link

I'm trying to render a component to string via SSR, but when trying to use the render() method I'm always getting this error:

render is not a function

Here's a simple repro: https://github.com/PierBover/svelte-ssr-webpack-test

Just do

npm i
npm run start

I'm not sure if the issue is actually in svelte-loader but I figured I'd first report this here in case I've messed up something with Webpack.

@PierBover
Copy link
Author

PierBover commented Jul 5, 2021

It's definitely an issue with svelte-loader and it was introduced with 3.0.0.

When using "svelte-loader": "^2.13.6" everything works as expected, even when using the latest Svelte version.

@PierBover
Copy link
Author

Ok... the problem was that there was a breaking change in 3.0.0 and the compiler options now must be specified into an new compilerOptions object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant