Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Consider merging more than 2 configurations #34

Open
dmtrKovalenko opened this issue Jul 17, 2019 · 0 comments
Open

Consider merging more than 2 configurations #34

dmtrKovalenko opened this issue Jul 17, 2019 · 0 comments

Comments

@dmtrKovalenko
Copy link

Hey, thanks for cool utility!
Oftentimes it's required to preserve the order of babel plugins. But curretly this lib is supporting only 2 configs to merge them. So I came up with the following:

const merge = require('babel-merge')
const rootConfig = require('../../babel.config')

const injectFirst = merge({ 
  plugins: ['idx']
}, rootConfig)

module.exports = merge(injectFirst, {
  presets: ['@emotion/babel-preset-css-prop'],
})

It will be much declarative if will be possible to do

module.exports = merge({ 
  plugins: ['idx']
}, rootConfig, {
  presets: ['@emotion/babel-preset-css-prop'],
})

I can open a PR for that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant