docs: update esm link

This commit is contained in:
Daniel Roe 2023-03-01 13:58:33 +00:00
parent 59918f569e
commit c35104c769

View File

@ -56,7 +56,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji
#### ESM Syntax
Nuxt 3 is an [ESM native framework](/docs/guide/going-further/esm). Although [`unjs/jiti`](https://github.com/unjs/jiti) provides semi compatibility when loading `nuxt.config` file, avoid any usage of `require` and `module.exports` in this file.
Nuxt 3 is an [ESM native framework](/docs/guide/concepts/esm). Although [`unjs/jiti`](https://github.com/unjs/jiti) provides semi compatibility when loading `nuxt.config` file, avoid any usage of `require` and `module.exports` in this file.
1. Change `module.exports` to `export default`
1. Change `const lib = require('lib')` to `import lib from 'lib'`