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

SSR cannot generate preload scripts of assets (by ssrContext.renderResourceHints() #1185

Open
clarkdo opened this issue Mar 9, 2018 · 0 comments

Comments

@clarkdo
Copy link

clarkdo commented Mar 9, 2018

Version

14.2.1

Reproduction link

https://github.com/nuxt/nuxt.js/blob/feat/webpack4/test/with-config.test.js#L46-L53

Steps to reproduce

Try to get preload scripts of assets in SSR resources hints by calling ssrContext.renderResourceHints()

What is expected?

Preload scripts of assets can generate successfully

What is actually happening?

Preload scripts of assets are empty


Currently we are working on the upgrading to Webpack4 in Nuxt, we met this issue in SSR font-preloading.

After some investigations, I found the issue was caused by two reasons.

  1. Webpack module assets is null, I have opened a pr fix: module assets is in buildInfo webpack/webpack#6640 (merged)

  2. Webpack ConcatenatedModule has changed module identifier to request additional hash, but vue-loader is still using request.

I'm not very sure the fix should be done in vue-ssr or vue-loader, so just opened issue here, we can have a discussion and figure out the solution 😸

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

No branches or pull requests

2 participants