Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template rendering by VueSSRServerPlugin raises error when whitespace not used around context property #5591

Closed
amoe opened this issue May 3, 2017 · 0 comments · Fixed by #5597

Comments

@amoe
Copy link

amoe commented May 3, 2017

Version

2.3.2

Reproduction link

https://github.com/amoe/vue-ssr-template-expansion

Steps to reproduce

  • npm install
  • npm run build:server
  • node renderingServer.js

Then access http://localhost:8080.

What is expected?

No error and to see the text: Blah

What is actually happening?

An error during rendering.

[ReferenceError: itl is not defined]
ReferenceError: itl is not defined
    at Object.eval (eval at <anonymous> (/home/amoe/foobar/node_modules/lodash.template/index.js:1089:12), <anonymous>:8:5)
    at TemplateRenderer.renderSync (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:1976:16)
    at RenderContext.done (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:5701:39)
    at RenderContext.next (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:2169:17)
    at RenderContext.next (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:2186:12)
    at RenderContext.cachedWrite [as write] (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:1646:9)
    at RenderContext.next (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:2180:14)
    at RenderContext.cachedWrite [as write] (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:1646:9)
    at RenderContext.renderNode (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:5412:15)
    at RenderContext.next (/home/amoe/foobar/node_modules/vue-server-renderer/build.js:2177:14)

This error is caused by the omission of whitespace in index.template.html.

<title>{{title}}</title>

should be

<title>{{ title }}</title>

This whitespace requirement should be documented, or removed if it's unnecessary; it's not consistent with the way that templates work elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants