Closed stevesouth closed 8 years ago
it's not possible at the moment because I wasn't sure how to best expose tweaking of the plugins nwb already manages via its different build configs to the user, but adding support for providing extra plugins might not take much effort.
nwb would need to pass its version of webpack to your config so you can use the plugins it ships with, so how does the following look as a speculative nwb.config.js
config API?
var MyConventionResolver = {
// ...
}
module.exports = function(deps) {
return {
type: 'react-app',
plugins: {
extra: [
new deps.webpack.ResolverPlugin([MyConventionResolver])
]
}
}
}
Looks fine, although why don't you have it under webpack.
module.exports = function(deps) {
return {
type: 'react-app',
webpack: {
plugins: [
new deps.webpack.ResolverPlugin([MyConventionResolver])
]
}
}
}
}
I was trying to reduce the amount of nesting needed for config when there wasn't as much of it , probably over-influenced by writing the initial documentation with code examples code per config item.
It does need to be made more consistent, along the lines of Karma config, which all lives under a kaema
prop.
I can't see how at first glance.
To be clear about my underlying requirement I am trying to add a custom resolver as per.
http://stackoverflow.com/questions/28026428/is-it-possible-to-create-custom-resolver-in-webpack