Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

"Extends" property #20

Open
GHNewbiee opened this issue Aug 8, 2020 · 3 comments
Open

"Extends" property #20

GHNewbiee opened this issue Aug 8, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@GHNewbiee
Copy link

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, the reboost'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.

@sarsamurmu
Copy link
Owner

sarsamurmu commented Aug 9, 2020

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?

@sarsamurmu sarsamurmu added the enhancement New feature or request label Aug 9, 2020
@GHNewbiee
Copy link
Author

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.

@sarsamurmu
Copy link
Owner

Yeah, you are right! Leaving this issue open.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants