filterConfigItems(items) {
        /**
         *
         * @param {import("@babel/core").ConfigItem[]} unique
         * @param {import("@babel/core").ConfigItem} item
         */
        function dedupe(unique, item) {
            if (item.file != null) {
                const toDeleteIndex = unique.findIndex(
                    element =>
                        element.file &&
                        element.file.resolved === (item.file && item.file.resolved)
                );

                if (toDeleteIndex >= 0) {
                    unique.splice(toDeleteIndex, 1);
                }
            }

            return [...unique, item];
        }

        /** @type {import("@babel/core").ConfigItem[]} */
        let unique = [];

        for (const configItem of items) {
            unique = dedupe(unique, configItem);
        }

        return unique;
    }
Filter merged presets or plugins

@internal
@param {import("@babel/core").ConfigItem[]} items
@returns {import("@babel/core").ConfigItem[]}