The two versions of bundles are:
- Modern bundle: targeting modern browsers that support ES modules
- Legacy bundle: targeting older browsers based on babel config (IE9 compatible by default).
package.json
- Nuxt will automatically detect
modern
build in whenmodern
is not specified, auto-detected mode is:
- Modern mode for
nuxt generate
can only beclient
- Use to set
crossorigin
attribute in<link>
and<script>
Please refer Phillip Walton’s excellent post for more knowledge regarding modern builds.