DEV Community

Discussion on: Modern Build in Nuxt.js

Collapse
 
coldestheart profile image
Ilia (COLD) • Edited

I still can't understand why we need:
"build: modern": "nuxt build --modern = server",

Cause i thought nuxt perfectly works with fetch and others features (Thanks to polyfills)

Yes, we can disable support for older browsers, but for what? What exactly will be an advantage for us using this method

Collapse
 
fernandosavio profile image
Fernando Sávio

At the bottom of the documentation of the modern property there is a link to an article which explains it better. Basically, if you cut out polyfills your bundle size and parse/eval time can be cut down by half (*based on the numbers of the article).

But is important to note that this approach doesn't disable support for older browser, it just avoid loading polyfills on modern browser which doesn't need them.