-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Options style support customize & update README.md #221
Conversation
Could you add a testcase? |
src/Plugin.js
Outdated
@@ -58,8 +58,8 @@ export default class Plugin { | |||
this.selectedMethods[methodName] = addDefault(file.path, path, { nameHint: methodName }); | |||
if (style === true) { | |||
addSideEffect(file.path, `${path}/style`); | |||
} else if (style === 'css') { | |||
addSideEffect(file.path, `${path}/style/css`); | |||
} else if (typeof style === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite typeof as a function typeof()
? || Define function isString
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Testcase added |
@yesmeck @afc163 Reason:
So, make option Can I create a new pr fix this bug? |
It's obvious, you can not write a function in JSON, how do you plan to fix it? |
Though you can not write function in JSON, you can still use function in the config of webpack for babel-loader, so I think it's ok to keep it as it is. |
OK, thx |
Options style support customize & update README.md
fix issue #220