Allow config through xo.config.js
jaredpalmer opened this issue · comments
Low hanging fruit I think would make config awesome..
module.exports = {
context: {
// let me add stuff to static x0 context in JS
},
modify: (webpackConfig, { env /* dev or static */ }) => {
// allow users to mutate config and return it
return webpackConfig
}
}
Thanks! Definitely wanted to focus on the zero-config part first, but for letting users customize per project, I was thinking of just checking for the existence of webpack.config.js
or .babelrc
files, which would be similar to how storybook handles it. Though it might be helpful to allow different configs for dev vs static.
For default props and CLI flags, currently you can add an x0
field to your package.json
– not entirely sure if that's similar to the context you have above...
Hilarious, the first issue is asking to configure the zero config
I know what u mean. However, Nothing about my suggestions for would change anything about existing battery-pack included behavior.