shakacode / sass-resources-loader

SASS resources (e.g. variables, mixins etc.) loader for Webpack. Also works with less, post-css, etc.
MIT License
982 stars 66 forks source link

Support double quotes in use imports from built-ins #147

Closed amannn closed 3 years ago

amannn commented 3 years ago

@justin808 Related to https://github.com/shakacode/sass-resources-loader/pull/142, I noticed double quotes need to be handled separately.

Also sorry for the subtle bug that slipped in in #142!


This change is Reviewable

justin808 commented 3 years ago

Thanks for the contribution.

  1. Can you make sure the new code you introduced has some examples in the example directory. If appropriate, add a new example.
  2. Does this require some doc change?

Can you try to find another reviewer familiar with these changes? @Tomburgs can you help?

justin808 commented 3 years ago

@amannn, @Tomburgs Should we merge/release in your opinions? or wait for improvements? See my question above.

justin808 commented 3 years ago

Should we let folks try the master branch before I push out a release?

Thanks @amannn and @Tomburgs!

amannn commented 3 years ago

Thanks a lot for merging this @justin808!

justin808 commented 3 years ago

@amannn I'll push the release when you give me the πŸ‘ .

amannn commented 3 years ago

I've just tried this out in my project and it works both with single and double quotes for me.

However what I did see, is that you can get an error when you have mixed quotes:

SassError: SassError: There's already a module with namespace "math".
    β•·
1   β”‚ @use 'sass:math';
    β”‚ ━━━━━━━━━━━━━━━━ original @use
... β”‚
6   β”‚ @use "sass:math";
    β”‚ ^^^^^^^^^^^^^^^^ new @use

It's currently not an issue for me though.

justin808 commented 3 years ago

Shipped!