+
Skip to content

Make src dir optional in vite-plugin-nitro #1672

@Pagebakers

Description

@Pagebakers

Which scope/s are relevant/related to the feature request?

vite-plugin-nitro

Information

We are currently looking into using the @analogjs/vite-plugin-nitro package for our React SPA, however since we don't use a src dir for our app, we don't seem to be able to use this plugin because the src directory is hardcoded in various locations of the internal vite/nitro config.

For a bit more context, we have a monorepo with the main app located in apps/web.

Client code (Tanstack router) is located in apps/web/app and server code in apps/web/server.

For example API routes are located in apps/web/server/routes/api, but Nitro server can't find them because it expects them to be in apps/web/src/server/routes/api

Maybe there's something I'm missing in the configuration? (the docs don't explain it in much detail)

Thanks!

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载