Skip to content
Discussion options

You must be logged in to vote

Solid 2 has a different build outcome. But I finally figured out what the problem was after reading around the solidjs website.

By default, the start.node isn't enabled at the vite plugin. It needs to be set as solid({ start: { node: true }, ssr: true}).

At default

vite.config.ts would look like this:

import solid from '@solidjs/vite-plugin'

plugins: [
      solid({ start: true, ssr: true, extensions: ['.jsx', '.tsx'], diagnostics: true }),
],

After building, the dist folder will contain client and server folders. And neither has a file that can be run by node.

To enable

vite.config.ts should look like this:

import solid from '@solidjs/vite-plugin'

plugins: [
     solid({ start: { node…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatAlcala9
Comment options

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