Skip to content

vite base not honored during dev mode #8052

@lettucebowler

Description

@lettucebowler

Reproduction

https://github.com/lettucebowler/remix-base-path

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 29.32 GB / 31.30 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.volta/tools/image/node/18.18.2/bin/node
    npm: 9.8.1 - ~/.volta/tools/image/node/18.18.2/bin/npm
    pnpm: 8.10.5 - ~/.volta/bin/pnpm
  npmPackages:
    @remix-run/dev: ^2.3.0 => 2.3.0
    @remix-run/eslint-config: ^2.3.0 => 2.3.0
    @remix-run/express: ^2.3.0 => 2.3.0
    @remix-run/node: ^2.3.0 => 2.3.0
    @remix-run/react: ^2.3.0 => 2.3.0
    vite: ^5.0.0 => 5.0.0

Used Package Manager

pnpm

Expected Behavior

js should be loaded relative of the base path, not relative to the host.

my application needs to live alongside other applications on a subpath, and the workflow to run it locally required it to run behind a proxy on that subpath

Actual Behavior

vite files are doing this as of 2.3.0, but the application code (ex app/routes/_index.tsx, hmr-runtime, etc) are loaded relative of the root path. This breaks the application when it is run behind a proxy on the configured base path.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions