Skip to content

[vue-server-renderer] ensure assets are unique #5540

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

Merged
merged 2 commits into from
Apr 29, 2017

Conversation

pi0
Copy link
Contributor

@pi0 pi0 commented Apr 27, 2017

Hello. During upgrade process of Nuxt.js to vue 2.3.x (nuxt/nuxt#633) we encounter strange behavior which adds duplicate entries to initial section of client manifest json file. This PR fixes this issue and also ensures every section's items are unique to prevent such kind of problem in future. This PR also prevents an unexpected exception when detecting and ignoring duplicated chunks.

{
  "publicPath": "/_nuxt/",
  "all": [
    "0.nuxt.bundle.309097aded56ffb03943.js",
    "1.nuxt.bundle.38d034e2ba6054b908d2.js",
    "nuxt.bundle.83400ec2bd4f29e215ba.js",
    "vendor.bundle.5953dc67058e339c4b85.js",
    "manifest.5953dc67058e339c4b85.js",
    "index.html"
  ],
  "initial": [
    "manifest.5953dc67058e339c4b85.js",
    "vendor.bundle.5953dc67058e339c4b85.js",
    "nuxt.bundle.83400ec2bd4f29e215ba.js",
    "manifest.5953dc67058e339c4b85.js",
    "vendor.bundle.5953dc67058e339c4b85.js"
  ],
  "async": [
    "0.nuxt.bundle.309097aded56ffb03943.js",
    "1.nuxt.bundle.38d034e2ba6054b908d2.js"
  ],
}

Type: Bug Fix
Breaking: No

Copy link
Member

@yyx990803 yyx990803 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, a few things:

  1. The package files are auto-built. The files you should be modifying are here;

  2. Make sure to follow the source code style (use ES2015 and no semicolons).

@pi0 pi0 force-pushed the server-renderer branch from 5991508 to 3f2e381 Compare April 28, 2017 05:02
@pi0 pi0 force-pushed the server-renderer branch from 3f2e381 to 1acc89d Compare April 28, 2017 05:04
@pi0
Copy link
Contributor Author

pi0 commented Apr 28, 2017

Thanks for guide @yyx990803 :) I've cleaned it up.

@yyx990803 yyx990803 merged commit 1635ca7 into vuejs:dev Apr 29, 2017
@yyx990803
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants