From a78af4f781b2565bfd90519976ea645f36fbbdd4 Mon Sep 17 00:00:00 2001 From: literat Date: Fri, 16 Feb 2024 10:35:23 +0100 Subject: [PATCH] Chore(web): Set `sass` as optional peer dependency refs #DS-1162 --- packages/web/README.md | 4 ++-- packages/web/package.json | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/web/README.md b/packages/web/README.md index 67bebfaf48..f39a53a960 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -33,8 +33,8 @@ in your HTML template: ### Advanced Implementation in Product with Sass -❗ **Important:** Make sure you have -[configured Sass load path][configuring-load-path] for `@tokens` and +❗ **Important:** Make sure you have `sass` dependency installed in your project (`sass` is marked as optional peer dependency since you can use the pre-built distribution CSS). +And also [configure Sass load path][configuring-load-path] for `@tokens` and `node_modules` so all dependencies are resolved correctly by Sass. Having the Sass load path configured, import just the components you need in diff --git a/packages/web/package.json b/packages/web/package.json index 619164a8aa..ee1cf920df 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -89,7 +89,12 @@ "vite-plugin-handlebars": "1.6.0" }, "peerDependencies": { - "sass": ">=1.57.0" + "sass": ">=1.57.0 < 2" + }, + "peerDependenciesMeta": { + "sass": { + "optional": true + } }, "nx": { "targets": {