Skip to content

VitePress does not honor vite.build.ssr = false #3162

@Swivelgames

Description

@Swivelgames

Describe the bug

Trying to build with vite.build.ssr = false, but it appears that VitePress continues to bundle everything as if preparing it to be served with a backend.

Reproduction

Build VitePress with vite.build.ssr = false

Expected behavior

Paths will become absolute and referenced modules will be bundled with the dist, unless excluded with rollupOptions.external.

System Info

System:
    OS: macOS 13.5.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 487.25 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.7.6 - /usr/local/bin/pnpm
  Browsers:
    Safari: 16.6
    Firefox: 118.0.2
    Chrome: 118.0.5993.117
  npmPackages:
    vitepress: 1.0.0-rc.14 => 1.0.0-rc.14

Additional context

VitePress should respect disabling SSR to allow for hosting via CDN.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions