Skip to content

Conversation

@huseeiin
Copy link
Contributor

when you don't use nitro, as in:

import { solidStart } from "@solidjs/start/config";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    solidStart(),
  ],
});

instead of:

import { solidStart } from "@solidjs/start/config";
import { nitro } from "nitro/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    solidStart(),
    nitro({
      preset: "node-server",
    }),
  ],
});

then solid start will use the 5173 port. now the port is aligned to be 3000 in both cases

@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2026

🦋 Changeset detected

Latest commit: 0bd2484

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Jan 10, 2026

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 0bd2484
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6962d3861dc31d00080b00f8
😎 Deploy Preview https://deploy-preview-2045--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2045
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2045

commit: 0bd2484

@katywings
Copy link
Contributor

@huseeiin Thank you 🥳

Copy link
Member

@atilafassina atilafassina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I can understand wanting SolidStart to have a consistent port number by default, this is overriding user settings.

export defaultConfig({
   server: {
         port: 8888
    },
    plugins: [ solidStart() ]
})

will serve the app on 3000 instead of 8888

@huseeiin
Copy link
Contributor Author

While I can understand wanting SolidStart to have a consistent port number by default, this is overriding user settings.

export defaultConfig({
   server: {
         port: 8888
    },
    plugins: [ solidStart() ]
})

will serve the app on 3000 instead of 8888

amazing observation. how do we fix this?

@katywings
Copy link
Contributor

katywings commented Jan 14, 2026

While I can understand wanting SolidStart to have a consistent port number by default, this is overriding user settings.

export defaultConfig({
   server: {
         port: 8888
    },
    plugins: [ solidStart() ]
})

will serve the app on 3000 instead of 8888

amazing observation. how do we fix this?

Maybe the solidStart plugin could add a different separate plugin (analog to our router, manifest, etc. plugins) for the port, that:

  • uses enforce: pre / post (depending on your logic)
  • checks the PORT env (if needed)
  • checks if the user has set a custom port via:
// mutate the config directly (use only when merging doesn't work)
const mutateConfigPlugin = () => ({
  name: 'mutate-config',
  config(config) {
    if (!config.hasSomeValue) {
      config.hasSomeValue = "Hello World";
    }
  },
}) 

@huseeiin huseeiin marked this pull request as draft January 14, 2026 15:50
@huseeiin
Copy link
Contributor Author

since its not ready yet, will convert to draft, just in case someone merges is it on accident

@atilafassina
Copy link
Member

@katywings / @huseeiin

the config() hook passes the configuration with only the user-set values. So if that config param above has the port defined, we don't touch it. If it doesn't, we can set one. I haven't tried it, but I think that would do...

@huseeiin
Copy link
Contributor Author

@katywings / @huseeiin

the config() hook passes the configuration with only the user-set values. So if that config param above has the port defined, we don't touch it. If it doesn't, we can set one. I haven't tried it, but I think that would do...

try it when you have time.

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

Successfully merging this pull request may close these issues.

3 participants