diff --git a/docs/config/index.md b/docs/config/index.md index 5eeee78a37ffef..49983a551c7453 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -257,8 +257,8 @@ export default defineConfig(({ command, mode }) => { { "exports": { ".": { - "import": "./index.esm.mjs", - "require": "./index.cjs.js" + "import": "./index.mjs", + "require": "./index.js" } } } diff --git a/docs/guide/build.md b/docs/guide/build.md index 578b8f495c41fb..4e0a98cc694506 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -161,7 +161,7 @@ Running `vite build` with this config uses a Rollup preset that is oriented towa ``` $ vite build building for production... -[write] my-lib.es.mjs 0.08kb, brotli: 0.07kb +[write] my-lib.mjs 0.08kb, brotli: 0.07kb [write] my-lib.umd.js 0.30kb, brotli: 0.16kb ``` @@ -172,10 +172,10 @@ Recommended `package.json` for your lib: "name": "my-lib", "files": ["dist"], "main": "./dist/my-lib.umd.js", - "module": "./dist/my-lib.es.mjs", + "module": "./dist/my-lib.mjs", "exports": { ".": { - "import": "./dist/my-lib.es.mjs", + "import": "./dist/my-lib.mjs", "require": "./dist/my-lib.umd.js" } }