Repository URL to install this package:
|
Version:
6.1.0 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @file what this does, is load an *in-memory* polyfill of `history` when
* on server, or in test
* @api https://www.npmjs.com/package/history
*/
let history;
if (typeof window !== 'object' ||
process.env.BUILD_FLAG_IS_SERVER === 'true' ||
process.env.NODE_ENV === 'test') {
// console.log('memoryHistory')
history = require('history/createMemoryHistory').default;
}
else {
// console.log('browserHistory')
history = require('history/createBrowserHistory').default;
}
let created;
const makeHistory = (props) => {
if (created !== undefined) {
return created;
}
created = history();
return created;
};
exports.makeHistory = makeHistory;
exports.default = makeHistory;
//# sourceMappingURL=makeHistory.js.map