Skip to content

Commit

Permalink
docs: update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Oct 23, 2024
1 parent ec3dab9 commit f16f2bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When importing a ESM only package by `require`, the following error happens.
In Node.js <=22, ESM files cannot be loaded by [`require`](https://nodejs.org/docs/latest-v22.x/api/esm.html#require) by default.

While it may work in Node.js >22 and in other runtimes, we still recommend converting your config to ESM by either:
While it may work using [`--experimental-require-module`](https://nodejs.org/docs/latest-v22.x/api/modules.html#loading-ecmascript-modules-using-require), or Node.js >22, or in other runtimes, we still recommend converting your config to ESM by either:

- adding `"type": "module"` to the nearest `package.json`
- renaming `vite.config.js`/`vite.config.ts` to `vite.config.mjs`/`vite.config.mts`
Expand Down

0 comments on commit f16f2bd

Please sign in to comment.