Skip to content

pages contains process.env.NODE_ENV !== 'production' report 404 error #419

@Alanscut

Description

@Alanscut

Describe the bug

any page which contains process.env.NODE_ENV !== 'production', it will report 404 error

Reproduction

step 1: clone https://github.com/Alanscut/vitepress-demo

step 2: run the project

step 3: visit the page
image

Expected behavior

could visit the page normally, the page will show:
image

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
    Memory: 7.05 GB / 15.90 GB
  Binaries:
    Node: 12.22.5 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - E:\npm\repo\yarn.CMD
    npm: 7.21.1 - ~\node_modules\.bin\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (94.0.992.50)
    Internet Explorer: 11.0.19041.1202

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildRelated to the build system

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions