From be79212a2015a8c445c141e0508e50054865a718 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 14 Feb 2024 02:32:53 +0800 Subject: [PATCH] Change webpack peer dependency to optional in loader Closes GH-2440. Reviewed-by: Remco Haszing Reviewed-by: Titus Wormer --- packages/loader/package.json | 5 +++++ packages/loader/readme.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/loader/package.json b/packages/loader/package.json index 26a018ad2..f9a363a09 100644 --- a/packages/loader/package.json +++ b/packages/loader/package.json @@ -49,6 +49,11 @@ "peerDependencies": { "webpack": ">=5" }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + }, "devDependencies": {}, "scripts": { "test": "npm run test-coverage", diff --git a/packages/loader/readme.md b/packages/loader/readme.md index 7b8329312..4e787734c 100644 --- a/packages/loader/readme.md +++ b/packages/loader/readme.md @@ -35,7 +35,7 @@ This package is a webpack loader to support MDX. ## When should I use this? This integration is useful if you’re using webpack (or another tool that uses -webpack, such as Next.js). +webpack, such as Next.js or Rspack). This integration can be combined with the Babel loader to compile modern JavaScript features to ones your users support.