v6.0.0
⚠ BREAKING CHANGES
- When merging arrays, defaults are last in order:
defu(['a', 'b'], ['c', 'd'])
// With v6+
['a', 'b', 'c', 'd']
// Before
['c', 'd', 'a', 'b']
- Using named exports instead of the default export
Before:
// With v6+
import { defu } from 'defu'
const { defu } = require('defu')
// Before
import defu from 'defu'
const defu = require('defu')
Other utilities are also exported as named exports to be tree-shakable:
// instead of defu.fn
import { defuFn } from 'defu'
// Instead of defu.arrayFn
import { defuArrayFn } from 'defu'
// Instead of defu.extend
import { createDefu } from 'defu'