Open GHNewbiee opened 4 years ago
I always thought that they can do it using Node JS modules. For example
// resolve.config.js
module.exports = {
// Resolve options
}
// babel.config.json
{
"plugins": ["some-plugin"]
}
// reboost.js
const { start } = require('reboost');
const BabelPlugin = require('@reboost/plugin-babel');
const resolveConfig = require('./resolve.config.js');
const babelConfig = require('./babel.config.json');
start({
resolve: {
...resolveConfig,
// If I want to override `extensions` option
extensions: myExtensions
},
plugins: [
BabelPlugin(babelConfig)
]
})
So do we really need that option?
You are absolutely right! We do not really need it! You may keep it as a low priority sugar syntax for the spread operator in future when all other high priorities will have been settled down and you'll wonder what else small features can be added to "improve/develop" the project. I have seen that "extends" property is often used by other packages, too.
Yeah, you are right! Leaving this issue open.
I suggest the use of
extends: string<path_to_foreign_config_file>
property in options which are related to foreign packages configuration. In this manner, thereboost
's own options are kept separate from the foreign ones.For example, in
contentServer
,resolve
,chokidar
,PostCSSPlugin
,esbuildPlugin
,BabelPlugin
, etc.There are people who like having a main config file, like windows "registry", and others who prefer working with many small config files. Just give them the freedom to choose and keep them satisfied.