From 0d7d03dbfab906f8ca8bfcb0da0164087466001b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=8F=AA=E5=89=8D=E7=AB=AF=E6=B1=AA?= <985313519@qq.com> Date: Thu, 13 Aug 2026 18:25:26 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1153fd4..696b4df 100644 --- a/README.md +++ b/README.md @@ -25,20 +25,35 @@ ## Installation -> [!WARNING] -> Since the [dayjs](https://github.com/iamkun/dayjs) used internally by element-plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), in order to ensure that it can be converted into a JavaScript modules before startup, you need to add a `.npmrc` file to the root directory of the project and add the following configuration: -> ``` -> shamefully-hoist=true -> node-linker=hoisted -> ``` -> Or install the `dayjs` dependency separately. - ```bash npx nuxi@latest module add element-plus # or npm i element-plus @element-plus/nuxt -D ``` +> [!WARNING] +> If you are using `pnpm`, please note that the [dayjs](https://github.com/iamkun/dayjs) package used internally by element-plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). +> In order to ensure that it can be converted into a JavaScript modules before startup, you need to configure pnpm to hoist dependencies. +> For pnpm 10.x and earlier, add the following configuration to a `.npmrc` file in the project root: +> +> ```ini +> shamefully-hoist=true +> node-linker=hoisted +> ``` +> +> For pnpm 11.x and later, add the following configuration to `pnpm-workspace.yaml`: +> +> ```yaml +> shamefullyHoist: true +> nodeLinker: hoisted +> ``` +> +> Alternatively, you can install the dayjs dependency explicitly in your project: +> +> ```bash +> pnpm add dayjs +> ``` + ## Configuration > [!WARNING] @@ -196,7 +211,7 @@ If there are directives that are not imported automatically from Element Plus, y If you wish to add automatically import content from Element Plus, you can add it here. -e.g. +e.g. ```ts [ From a46229f0027d314376cc71f0501ba34f214487e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=8F=AA=E5=89=8D=E7=AB=AF=E6=B1=AA?= <985313519@qq.com> Date: Fri, 14 Aug 2026 10:13:12 +0800 Subject: [PATCH 2/3] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 696b4df..f5ea9fb 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ npm i element-plus @element-plus/nuxt -D ``` > [!WARNING] -> If you are using `pnpm`, please note that the [dayjs](https://github.com/iamkun/dayjs) package used internally by element-plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). +> If you are using `pnpm`, please note that the [dayjs](https://github.com/iamkun/dayjs) package used internally by Element Plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). > In order to ensure that it can be converted into a JavaScript modules before startup, you need to configure pnpm to hoist dependencies. > For pnpm 10.x and earlier, add the following configuration to a `.npmrc` file in the project root: > @@ -132,7 +132,7 @@ e.g. `'zh-cn'` - Type: `boolean` - Default: `false` -Whether to cache the element-plus components and directives. **Only effective in development mode**. +Whether to cache the Element Plus components and directives. **Only effective in development mode**. If you enable this feature, you will get faster loading speed in development mode. From c883f54f4fa104567261d62eed9309a406f6d3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=8F=AA=E5=89=8D=E7=AB=AF=E6=B1=AA?= <985313519@qq.com> Date: Fri, 14 Aug 2026 18:01:58 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5ea9fb..927bb80 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,14 @@ npm i element-plus @element-plus/nuxt -D > [!WARNING] > If you are using `pnpm`, please note that the [dayjs](https://github.com/iamkun/dayjs) package used internally by Element Plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). > In order to ensure that it can be converted into a JavaScript modules before startup, you need to configure pnpm to hoist dependencies. -> For pnpm 10.x and earlier, add the following configuration to a `.npmrc` file in the project root: +> For pnpm 10.5.x and earlier, add the following configuration to a `.npmrc` file in the project root: > > ```ini > shamefully-hoist=true > node-linker=hoisted > ``` > -> For pnpm 11.x and later, add the following configuration to `pnpm-workspace.yaml`: +> For pnpm 10.6.x and later, add the following configuration to `pnpm-workspace.yaml`: > > ```yaml > shamefullyHoist: true