-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Merge postcss-modules config #75
Conversation
src/transforms/postcss.js
Outdated
@@ -24,12 +26,16 @@ async function getConfig(asset) { | |||
} | |||
|
|||
config = config || {}; | |||
config.plugins = loadPlugins(config.plugins, asset.name); | |||
const postcssModulesConfig = Object.assign(get(config.plugins, 'postcss-modules') || {}, { |
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.
Why not just config.plugins['postcss-modules']
?
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.
@thejameskyle type safety
package.json
Outdated
@@ -23,6 +23,8 @@ | |||
"htmlnano": "^0.1.6", | |||
"is-url": "^1.2.2", | |||
"js-yaml": "^3.10.0", | |||
"lodash.get": "^4.4.2", | |||
"lodash.omit": "^4.5.0", |
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.
I'd rather avoid adding more dependencies if we can. omit could just be delete config.plugins['postcss-modules']
, and get could be just be config.plugins['postcss-modules']
.
@devongovett Now, just pure js |
* Merge postcss-modules config * Use pure js instead of lodash * formatting
* Merge postcss-modules config * Use pure js instead of lodash * formatting
…75) Add babel plugin to preload/prefetch import transform attributes into webpack magic comments Approved-by: Maia Teegarden
No description provided.