From 06675852b6de1d45600f31183f44c8efebe0c38e Mon Sep 17 00:00:00 2001 From: Sachin Raja Date: Sun, 22 May 2022 11:42:51 -0700 Subject: [PATCH] docs: update lib mode example (#8279) --- docs/config/index.md | 4 ++-- docs/guide/build.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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" } }