Skip to content

Remove vue-server-renderer as a peer dependency #440

Closed
@eddyerburgh

Description

@eddyerburgh

What problem does this feature solve?

renderToString was added in beta.12 , which uses vue-server-renderer.

I don't expect many users will call this method, as it's intended use is for testing server side code. Adding it as a peer dependency will warn users that they need to install it, even though they probably won't use the renderToString method.

What does the proposed API look like?

  1. Remove vue-server-renderer as a peer dependency and handle it ourselves, using something like ensureRequire—https://github.com/vuejs/vue-jest/blob/master/lib/compilers/haml-compiler.js#L6. Users will still need to add additional config to webpack, because webpack will try to bundle native node modules in vue-server-renderer.
  2. Split @vue/test-utils, and @vue/server-test-utils. @vue/test-utils will expose mount and shallow, @vue/server-test-utils will expose renderToString.

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