From 6a48b532165f7573d69a06b038bc40bb8e801ebc Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 16 Sep 2024 12:03:43 +0300 Subject: [PATCH] patch-fix --- patches/sass-embedded+1.78.0.patch | 4 ++-- vite.config.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/patches/sass-embedded+1.78.0.patch b/patches/sass-embedded+1.78.0.patch index 3a16d8ec..c9c84c71 100644 --- a/patches/sass-embedded+1.78.0.patch +++ b/patches/sass-embedded+1.78.0.patch @@ -2,7 +2,7 @@ diff --git a/node_modules/sass-embedded/dist/bin/sass.js b/node_modules/sass-emb old mode 100755 new mode 100644 diff --git a/node_modules/sass-embedded/dist/lib/src/legacy/importer.js b/node_modules/sass-embedded/dist/lib/src/legacy/importer.js -index 51fd501..2246d7f 100644 +index 51fd501..ed5880f 100644 --- a/node_modules/sass-embedded/dist/lib/src/legacy/importer.js +++ b/node_modules/sass-embedded/dist/lib/src/legacy/importer.js @@ -92,6 +92,8 @@ class LegacyImporterWrapper { @@ -10,7 +10,7 @@ index 51fd501..2246d7f 100644 // exist so that the user's custom importer can still handle the // URL. + console.warn(`Invalid URL detected: ${url}. Skipping import.`); -+ return null; ++ return; } else { throw error; diff --git a/vite.config.ts b/vite.config.ts index 1f79a671..491520d1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,6 @@ // biome-ignore lint/correctness/noNodejsModules: import path from 'node:path' +import sass from "sass"; import { CSSOptions } from 'vite' import mkcert from 'vite-plugin-mkcert' import { PolyfillOptions, nodePolyfills } from 'vite-plugin-node-polyfills' @@ -32,9 +33,10 @@ export default { css: { preprocessorOptions: { scss: { - implementation: require('sass'), - additionalData: '@import "src/styles/imports";\n', - includePaths: ['./public', './src/styles'] + sourceMaps: false, + implementation: sass, + additionalData: '@import "~/styles/imports";\n', + includePaths: ['./public', './src/styles'], } } as CSSOptions['preprocessorOptions'] },