Skip to content

Commit 57ee457

Browse files
committed
fix: Fix SASS at-use import paths from node_modules.
When using Patternslib in another project the relative node_module at-use rule imports might fail. This is now fixed as follows: - For the css Makefile compile target, define node_modules as load-path. - For the webpack compiler, the node_modules directory is already defined as load-path. - Change the at-use import in scss files for the defined node_modules import path.
1 parent 0afe106 commit 57ee457

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bundle-pre:
5959

6060
.PHONY: css
6161
css:
62-
@$(SASS) -I style -I _sass -I . _sass/_patterns.scss style/patterns.css
62+
@$(SASS) -I style --load-path node_modules/ _sass/_patterns.scss style/patterns.css
6363

6464

6565
# Update patterns-site

src/pat/colour-picker/_colour-picker.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@charset "UTF-8";
2-
3-
@use "../../../node_modules/spectrum-colorpicker/spectrum";
2+
@use "spectrum-colorpicker/spectrum";
43

54
.checkNative,
65
.checkPattern {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@charset "UTF-8";
2-
@use "../../../node_modules/pikaday/scss/pikaday.scss";
2+
@use "pikaday/scss/pikaday.scss";

src/pat/tooltip/_tooltip.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@charset "UTF-8";
2-
@use "../../../node_modules/tippy.js/dist/tippy";
2+
@use "tippy.js/dist/tippy";

0 commit comments

Comments
 (0)