svelte-preprocess
svelte-preprocess copied to clipboard
prependData, but @import's paths in it to files relative to them
In my project, I have mobile.scss
next to each component and this kind of file structure:
+Component(folder)
++Component.svelte
++mobile.scss
+Component2(folder)
++Component2.svelte
++mobile.scss
I would like to have @import "./mobile.scss"
in each component and each component take its own mobile.scss
Is it possible?
Hey @MarkTanashchuk 👋 Not right now, no. However, I was thinking of making it accept a method that receives the filename
and returns the string that will be prepended. I've also wanted to deprecate it in favor of something akin to the additionalData
from sass-loader
(https://webpack.js.org/loaders/sass-loader/#additionaldata).
I will be happy if this function is implemented
Have a successful development =)