Home

Issue: 2404

A lot of repeating code in nuxt build pages

[issue link]

I don’t know if that’s the issue or it’s my misunderstanding of how this all works. When I run nuxt build --analyze, I get the following picture:
screenshot from 2017-12-15 12-44-55
I see there a lot of pages, and many of them contain the same jquery library (and some other as well). Is it necessary to include jquery into the every page file?
Assume it’s for server rendering (like rendering the page has to use the complete bundle of that page). But then, when I open any page in the browser, I see the following requests:
screenshot from 2017-12-15 12-51-21
It seems that all pages files are loaded for any request.
Why so?
If the system requires to load every page js file, then why there’s no single bundle file for the front end that contains everything without repeating libraries?
If it’s incremental, then why the front end requests all the pages?

This question is available on Nuxt.js community (#c2087)