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

vue/vue-server-renderer vue-ssr-client-manifest.json The initial property is an empty array times the bug #11764

Closed
wbbhacker opened this issue Nov 10, 2020 · 2 comments

Comments

@wbbhacker
Copy link

wbbhacker commented Nov 10, 2020

What problem does this feature solve?

  1. When the initial attribute of the vUE - SSr-client-manifest.json file is an empty array

  2. Start the Node service and access the IP in the browser

  3. Build.dev. js file in the vue-server-renderer plugin reported a bug in line 9074sha

TypeError: Cannot read property 'file' of undefined
at /Users/binbinwang/workspace/x-fe/vue-ssr/node_modules/vue-server-renderer/build.dev.js:9074:24

What does the proposed API look like?

vue-ssr-client-manifest.json

{
  "publicPath": "/dist/",
  "all": [
    "app.0178268b84efde12045b.js"
  ],
  "initial": [],
  "async": [
    "app.0178268b84efde12045b.js"
  ],
  "modules": {
    "239adfd4": [
      0
    ],
    "6fbc4fdc": [
      0
    ]
  }
}
@wbbhacker
Copy link
Author

wbbhacker commented Nov 10, 2020

I solved it for the time being, but I don't know if there will be any other problems

return needed.map(function (ref) {
      if(!ref) return   // Add this line
      var file = ref.file;

      return ("<script src=\""   (this$1.publicPath)   file   "\" defer></script>")
    }).join('')

@posva
Copy link
Member

posva commented Nov 10, 2020

fixed in #11609

@posva posva closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants