mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
7eaa3b1a2b
Injects environment variables into the app through webpack, rather than script snippets in index.html. As part of this: * Updated server.js to use node’s path package to resolve file paths * Ensure that all url environment variables passed to the app don’t have a trailing slash, allowing for cleaner template urls **Note**: There are still a number of constants that should be taken out of the app and put into environment variables.
16 lines
405 B
JavaScript
16 lines
405 B
JavaScript
'use strict';
|
|
|
|
import useBasename from 'history/lib/useBasename';
|
|
import useQueries from 'history/lib/useQueries';
|
|
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
|
import AppConstants from './constants/application_constants';
|
|
|
|
|
|
const history = useBasename(useQueries(createBrowserHistory))({
|
|
basename: AppConstants.baseUrl
|
|
});
|
|
|
|
history.locationQueue = [];
|
|
|
|
export default history;
|