-
-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
Creating multiple instances of this plugin that specify distinct generateScopedName functions causes unexpected behaviour as the provided function is effectively set as global.
This causes the last instantiated plugin's generateScopedName function to be used for all instances of the plugin, which in my case is very difficult to work around.
const pluginOne = postcssModules({
generateScopedName: function(nodeName, fileName, css) {
return "one";
},
});
const pluginTwo = postcssModules({
generateScopedName: function(nodeName, fileName, css) {
return "two";
},
});
//Using pluginOne now will result in all classes being named "two"
Expected behaviour would be for the provided function to be used for only the instance of plugin that is constructed with it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels