Does @snowpack/plugin-sass
has support for aliasing?
#1305
Replies: 8 comments 12 replies
-
Nope, this isn't currently supported! |
Beta Was this translation helpful? Give feedback.
-
I also need this capability in order to import global variables.. |
Beta Was this translation helpful? Give feedback.
-
I'd also like to +1 this problem. It works great for imports in JavaScript (and TypeScript) but scss If you could point me into the right direction, perhaps I could make a PR? |
Beta Was this translation helpful? Give feedback.
-
It would be great to see a solution for this, it looks like this it the main issue holding us back from converting our webpack project. |
Beta Was this translation helpful? Give feedback.
-
all my projects have a three-acrhitecture style |
Beta Was this translation helpful? Give feedback.
-
I integrated this feature in my plugin https://github.com/Danzo7/snowpack-plugin-sass-compiler ,I will try to PR it to the official plugin when the guy behind this is back. |
Beta Was this translation helpful? Give feedback.
-
For me, I have to specify the load path and get rid of the '~' in the @import. // @import `~style/forms.scss` to
@import 'style/forms.scss'; [
'@snowpack/plugin-sass',
{
compilerOptions: {
loadPath: './src',
},
},
], |
Beta Was this translation helpful? Give feedback.
-
I rewrite a plugin-sass only for my only use with the function denotes above to solve the pain here. Sass Javascript can find the string after @use @import etc. for us and then we can get the match to replaced in the content. |
Beta Was this translation helpful? Give feedback.
-
I was playing with snowpack with scss. I came to know about this
@snowpack/plugin-sass
before that I was compiling my usingwatch
script. Plugin works well. I am not sure this feature is implement by@snowpack/plugin-sass
yet. So suppose that in mysnowpack.config.js
. I created alias like this:and inside some
.scss
file . Before using the plugin its working well as it is taking relative path fromsnowpack config
. I am just curious in my scss file can I use something like this:I can always do this to working:
Not sure about first one why it is not working
Beta Was this translation helpful? Give feedback.
All reactions