glromeo / esbuild-sass-plugin

esbuild plugin for sass
MIT License
155 stars 40 forks source link

Import of sass files without extension containing multiple dots (like ```common.mixins.scss```) #166

Closed olte36 closed 9 months ago

olte36 commented 9 months ago

Hello,

I've found an issue, when a sass file imports another sass file without .scss or other extension and it has multiple dots in its name like

// common.mixins.scss
$_padding: 10px;

@mixin padded {
    padding: $_padding;
}

// index.scss
@use "./common.mixins" as c;

body {
  @include c.padded;
}

The plugin throws an error that it cannot find common.mixins because it treats .mixins as an extension.

I decided to fix it myself, please check my PR :smiley: https://github.com/glromeo/esbuild-sass-plugin/pull/167

glromeo commented 9 months ago

That's the spirit mate!

Thank you very much for your contribution I will kick off a new build soon