From 6f407119639d08fb5c6b701f2e24aa95ef483796 Mon Sep 17 00:00:00 2001 From: Franck Gaudin Date: Fri, 27 Oct 2023 10:14:37 -0400 Subject: [PATCH] fix(tokens): change the configuration to use an absolute path --- packages/tokens/src/style-dictionary/config.ts | 3 --- packages/tokens/src/style-dictionary/format/font-face.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/tokens/src/style-dictionary/config.ts b/packages/tokens/src/style-dictionary/config.ts index 647720655..1ce7c1d82 100644 --- a/packages/tokens/src/style-dictionary/config.ts +++ b/packages/tokens/src/style-dictionary/config.ts @@ -21,9 +21,6 @@ export const fontsConfig = { "type": "font" } }, - "options": { - "fontPathPrefix": "/" - } } ], "actions": ["copy_assets"] diff --git a/packages/tokens/src/style-dictionary/format/font-face.ts b/packages/tokens/src/style-dictionary/format/font-face.ts index 8c09058cf..6104dbefb 100644 --- a/packages/tokens/src/style-dictionary/format/font-face.ts +++ b/packages/tokens/src/style-dictionary/format/font-face.ts @@ -1,7 +1,7 @@ import type { Dictionary, Options, TransformedToken } from "style-dictionary"; export function fontFace ({ dictionary, options }: { dictionary: Dictionary; options: Options }) { - const fontPathPrefix = options.fontPathPrefix || "../"; + const fontPathPrefix = options.fontPathPrefix || ""; const tokens = dictionary.allTokens; // https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src