Skip to content

Commit

Permalink
skip logging when namedExports is a function, closed #82
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Mar 5, 2018
1 parent fc2ba64 commit 3163614
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/postcss-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export default {
// eslint-disable-next-line guard-for-in
for (const name in json) {
const newName = getClassName(name)
if (name !== newName) {
// Log transformed class names
// But skip this when namedExports is a function
// Since a user like you can manually log that if you want
if (name !== newName && typeof options.namedExports !== 'function') {
console.warn(`Exported "${name}" as "${newName}" in ${humanlizePath(this.id)}`)
}
output += `export var ${newName} = ${JSON.stringify(
Expand Down

1 comment on commit 3163614

@sholladay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crazy fast 6 minute response time. Thanks so much, @egoist! ❤️

Please sign in to comment.