Skip to content

npm run dev should have an option to output build files #3581

@thequailman

Description

@thequailman

Describe the problem

When developing my frontend code, I like having my backend serve the dev assets like in production. In webpack, I can do this by configuring the middleware settings. This helps because I can use relative paths from the frontend to the backend, i.e. /api.

Describe the proposed solution

I believe SvelteKit just needs to honor the config "vite.server.middlewareMode = ssr" in svelte.config.js. Though #2232 make this seem like it may be harder to do.

Alternatives considered

I could try doing HTTP proxying from my backend to the frontend, it's just a pain to wire up.

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions