vitepress: While building for production vitepress gives syntax error

Describe the bug

While running for production : npm run docs:build, then “SyntaxError: The requested module ‘vue’ does not provide an export named ‘computed’” occurred.

Reproduction

Try to build it for production : npm run docs:build “devDependencies”: { “vitepress”: “^1.0.0-beta.5” }

Expected behavior

It should build the docs for production.

System Info

Windows Machine,

Additional context

No response

Validations

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Consider adding this in your config for now:

  vite: {
    ssr: {
      noExternal: ['vue']
    }
  }

I’m not completely sure why this happens. Will look into that.