I am having trouble with importing the sass module in a Svelte-Project using sveltekit and vite.I want to compile scss to css with typescript dynamically during runtime and decided to use this module.
When I import the components from sass like this:
import * as sass from 'sass';
or like this:
import { AsyncCompiler, Compiler, type CompileResult } from 'sass';
I am getting the following error:
RangeError: Maximum call stack size exceeded at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64) at Object.get (chunk-2PQ4CLQN.js?v=a6d32be2:9:64)
According to the sass-documentary, this should be the correct way to import the module.
I simply followed the instructions but everything resulted in getting the described error.Even updating the package to the latest version did not fix my problem.
Did anyone encounter the same problem and did you find a solution or a workaround?I am grateful for any tips.Thank you in advance!