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

Consider merging more than 2 configurations #34

@dmtrKovalenko

Description

@dmtrKovalenko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions