We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f2f8c5 commit 77ae35fCopy full SHA for 77ae35f
.changeset/tricky-snakes-appear.md
@@ -0,0 +1,5 @@
1
+---
2
+'style-dictionary': patch
3
4
+
5
+Fix scenario of passing absolute paths in Node env, do not remove leading slash in absolute paths.
lib/utils/combineJSON.js
@@ -72,8 +72,11 @@ export default async function combineJSON(
72
files = files.concat(new_files);
73
}
74
75
- // adjust for browser env glob results have leading slash
76
- files = files.map((f) => f.replace(/^\//, ''));
+ if (typeof window === 'object') {
+ // adjust for browser env glob results have leading slash
77
+ // make sure we dont remove these in Node, that would break absolute paths!!
78
+ files = files.map((f) => f.replace(/^\//, ''));
79
+ }
80
81
for (let i = 0; i < files.length; i++) {
82
const filePath = files[i];
0 commit comments