modules-pack
Version:
JavaScript Modules for Modern Frontend & Backend Projects
7 lines (5 loc) • 309 B
JavaScript
import { Active } from 'utils-pack'
// history requires DOM and will throw error in Node when used with Next.js
// thus need to do conditional check before importing
export const history = Active.history = typeof window !== 'undefined' ? require('history').createBrowserHistory() : {}
export default history