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

fix(vue-renderer): call render:resourcesLoaded hook before createRenderer #6223

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Aug 12, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Resloves #5960, move hook before renderers creation, provide possibility to change resources at runtime.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@clarkdo clarkdo requested a review from pi0 August 12, 2019 20:43
@pi0 pi0 changed the title fix: call resourcesLoaded hook before createRenderer fix(vue-renderer): call render:resourcesLoaded hook before createRenderer Aug 12, 2019
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

waiting for CI... thanks :)

@pi0
Copy link
Member

pi0 commented Aug 12, 2019

I was also thinking to make it possible dynamically changing publicPath without the hooks hack.

@clarkdo
Copy link
Member Author

clarkdo commented Aug 12, 2019

Function publicPath?

@pi0
Copy link
Member

pi0 commented Aug 12, 2019

@clarkdo no. simply updating the value from loaded config. which can be set differently at production. currently it is loaded from dist manifest.

@clarkdo
Copy link
Member Author

clarkdo commented Aug 12, 2019

Also need a manual updating step at runtime?

@pi0
Copy link
Member

pi0 commented Aug 12, 2019

by nuxt :) WIll create a PR after this :)

@pi0 pi0 merged commit 35ba655 into nuxt:dev Aug 12, 2019
@clarkdo clarkdo deleted the createRenderer-resources branch August 12, 2019 20:55
@timmw
Copy link

timmw commented Aug 13, 2019

I was also thinking to make it possible dynamically changing publicPath without the hooks hack.

@pi0 could you ping me when you make this PR. Thanks!

@pi0 pi0 mentioned this pull request Aug 19, 2019
pi0 pushed a commit that referenced this pull request Aug 20, 2019
@gapipro
Copy link

gapipro commented Aug 28, 2019

@clarkdo Is changing publicPath working only in SSR mode al also somehow in SPA? We are trying to get it to work, but there isn't any effect after this change.

@clarkdo
Copy link
Member Author

clarkdo commented Aug 28, 2019

For spa, since browser has not interaction after first page request, so even you change the publicPath, the client side can't know the changes before a page reload. Could try refreshing the page ? If it still doesn't work, could you provide a repo ?

@gapipro
Copy link

gapipro commented Aug 28, 2019

Well ideally it would be that publicPath that is updated in one of the hooks gets injected into final runtime bundle. Thats one way.

The other solution would be that Nuxt gets support for __webpack_public_path__

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

Successfully merging this pull request may close these issues.

None yet

5 participants