maoberlehner / node-sass-magic-importer

Custom node-sass importer for selector specific imports, module importing, globbing support and importing files only once.
MIT License
292 stars 28 forks source link

Support for ordering the imports when globbing #212

Open wokung opened 4 years ago

wokung commented 4 years ago

Hello,

can you implement the possibility to give the import files an order?

I am migrating an old project and there, the ordering of the imported css files are important, since the possibility of css overriding some rules I am not aware of.

However, I tried this importer and it loads all the css files in alphabetical order?

thanks

Ambient-Impact commented 2 years ago

If you need files imported in a specific order, globbing doesn't really make sense. Instead just use an _index.scss file instead with the specific order listed in it and import the folder path where it resides and Sass will automatically find the _index.scss and import in the order you need.