Skip to content

Commit

Permalink
Fix import of sass abstraction files
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Jan 18, 2025
1 parent f275b61 commit 5b59831
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { fileURLToPath } from "node:url";
import { readFileSync } from "node:fs";
import { extname, relative, resolve } from "node:path";
import { dirname, extname, join, relative, resolve } from "node:path";
import { defineConfig } from "vite";
import { glob } from "glob";
import react from "@vitejs/plugin-react";
Expand All @@ -11,16 +11,18 @@ import { libInjectCss } from "vite-plugin-lib-inject-css";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { codecovVitePlugin } from "@codecov/vite-plugin";

const currentDirectory = dirname(fileURLToPath(import.meta.url));

// https://vitejs.dev/config/
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `
@use "src/styles/abstracts/variables" as *;
@use "src/styles/abstracts/palette" as *;
@use "src/styles/abstracts/fonts" as *;
@use "src/styles/abstracts/mixins" as *;
@use "${join(currentDirectory, "./src/styles/abstracts/variables")}" as *;
@use "${join(currentDirectory, "./src/styles/abstracts/palette")}" as *;
@use "${join(currentDirectory, "./src/styles/abstracts/fonts")}" as *;
@use "${join(currentDirectory, "./src/styles/abstracts/mixins")}" as *;
`,
},
},
Expand Down

1 comment on commit 5b59831

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual regression test result - success

Component Story Success Viewport MisMatch Percentage
components-button string-children phone 0.00%
components-button string-children tablet 0.10%
input-input default phone 0.00%
input-input default tablet 0.10%
input-input line phone 0.00%
input-input line tablet 0.04%
input-input box phone 0.00%
input-input box tablet 0.04%
input-textarea line phone 0.00%
input-textarea line tablet 0.04%
input-textarea box phone 0.00%
input-textarea box tablet 0.04%
typography-typography default phone 0.00%
typography-typography default tablet 0.07%

Please sign in to comment.