Anidetrix / rollup-plugin-styles

🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
https://anidetrix.github.io/rollup-plugin-styles
MIT License
242 stars 43 forks source link

feat: fall back to module resolution when relative imports fail #198

Open kherock opened 2 years ago

kherock commented 2 years ago

Resolves #187. These changes enable developers to import sass by the same resolution logic that webpack's sass-loader uses.

codecov[bot] commented 2 years ago

Codecov Report

Merging #198 (3efaa44) into main (11fcf2d) will decrease coverage by 0.08%. The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
- Coverage   99.63%   99.54%   -0.09%     
==========================================
  Files          36       36              
  Lines        1083     1089       +6     
  Branches      318      319       +1     
==========================================
+ Hits         1079     1084       +5     
- Misses          4        5       +1     
Impacted Files Coverage Δ
src/loaders/sass/importer.ts 96.42% <95.00%> (-3.58%) :arrow_down:
src/utils/url.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 11fcf2d...3efaa44. Read the comment docs.

kherock commented 2 years ago

@Anidetrix (awesome to see that you're back!) I just rebased this and would appreciate getting it in an upcoming release. The implementation here should be fully backwards-compatible.

leximarie commented 1 year ago

@Anidetrix This would be very helpful to get in a release