diff --git a/dashboard/build.sh b/dashboard/build.sh index cf49874cd..af5c2fa37 100755 --- a/dashboard/build.sh +++ b/dashboard/build.sh @@ -5,5 +5,8 @@ set -eu echo "=> Create timezones.js" ./scripts/createTimezones.cjs ./public/js/timezones.js +echo "=> Build theme.css for oidc views" +./node_modules/.bin/sass --pkg-importer=node ./src/theme.scss ./public/theme.css + echo "=> Build the dashboard apps" ./node_modules/.bin/vite build diff --git a/dashboard/src/theme.scss b/dashboard/src/theme.scss index a7702c659..1108092a3 100644 --- a/dashboard/src/theme.scss +++ b/dashboard/src/theme.scss @@ -53,7 +53,7 @@ $state-danger-bg: $brand-danger; $state-danger-text: $brand-danger; $state-danger-border: $brand-danger; -@import "bootstrap-sass"; +@import "pkg:bootstrap-sass"; // ---------------------------- // Bootstrap extension diff --git a/dashboard/vite.config.mjs b/dashboard/vite.config.mjs index 0e735639f..d25f74973 100644 --- a/dashboard/vite.config.mjs +++ b/dashboard/vite.config.mjs @@ -1,6 +1,7 @@ import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; import { resolve } from 'path'; +import { NodePackageImporter } from "sass"; // https://vitejs.dev/config/ export default defineConfig({ @@ -30,4 +31,13 @@ export default defineConfig({ }, }, }, + // only exists since we also want to use sass to compile theme.css for oidc login views + css: { + preprocessorOptions: { + scss: { + api: "modern-compiler", + importers: [new NodePackageImporter()], + }, + }, + }, });