diff --git a/.changeset/json5-and-yaml-config.md b/.changeset/json5-and-yaml-config.md index fd0355f10d7..cb9a6e50611 100644 --- a/.changeset/json5-and-yaml-config.md +++ b/.changeset/json5-and-yaml-config.md @@ -2,4 +2,4 @@ "webpack-cli": minor --- -feat: support `.json5`, `.yaml`/`.yml` and `.toml` configuration files by parsing them directly, with the parser package (`json5`, `js-yaml`, `toml`) installed on demand by the user +feat: support `.json5`, `.yaml`/`.yml` and `.toml` configuration files by parsing them directly, with the parser package (`json5`, `js-yaml`, `toml`) installed on demand by the user and declared as optional `peerDependencies` so the parsers resolve correctly under Yarn PnP diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index da325c79931..7182330efe0 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -44,11 +44,23 @@ "@types/envinfo": "^7.8.4" }, "peerDependencies": { + "js-yaml": "^4.0.0 || ^5.0.0", + "json5": "^2.2.3", + "toml": "^3.0.0 || ^4.0.0", "webpack": "^5.101.0", "webpack-bundle-analyzer": "^4.0.0 || ^5.0.0", "webpack-dev-server": "^5.0.0" }, "peerDependenciesMeta": { + "js-yaml": { + "optional": true + }, + "json5": { + "optional": true + }, + "toml": { + "optional": true + }, "webpack-bundle-analyzer": { "optional": true },