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

node-sass-once-importer does not create a new store per importer #189

Closed ychailler closed 5 years ago

ychailler commented 5 years ago

The context nodeSassOnceImporterContext created in each importer refers to the same store created in the contextTemplate object. When using webpack-dev-server and the watch feature, the resulted file generated after the first code modification become empty as all imports are already stored in the store.

The behaviour is different from the node-sass-magic-importer where the store is created for each importer. In that case it works fine

maoberlehner commented 5 years ago

Do I understand this correctly that node-sass-once-importer does not work but node-sass-magic-importer does work correctly?

ychailler commented 5 years ago

no it is the opposite: it works with node-sass-magic-importer but not with node-sass-once-importer

maoberlehner commented 5 years ago

That's exactly what i wrote 😅

I'll take a look into it. Thanks for reporting.

maoberlehner commented 5 years ago

node-sass-once-importer@5.3.1 should work as expected. Thanks again for reporting this :)