use existing aliases in the requires
This commit is contained in:
parent
23dab7b6cf
commit
d63bea9571
@ -2,9 +2,11 @@ const React = require('react');
|
|||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
const ReactRouter = require('react-router');
|
const ReactRouter = require('react-router');
|
||||||
|
|
||||||
const actions = require('../state/actions');
|
const actions = require('@state/actions');
|
||||||
const Home = require('./home/');
|
const Home = require('@containers/home');
|
||||||
const NotFound = require('./not-found/');
|
const NotFound = require('@containers/not-found');
|
||||||
|
const Header = require('@components/header');
|
||||||
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
updateRouter
|
updateRouter
|
||||||
|
@ -4,8 +4,8 @@ const ReactHotLoader = require('react-hot-loader');
|
|||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
const ReactRouter = require('react-router');
|
const ReactRouter = require('react-router');
|
||||||
|
|
||||||
const App = require('./containers/app');
|
const App = require('@containers/app');
|
||||||
const store = require('./state/store');
|
const store = require('@state/store');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
IntlProvider
|
IntlProvider
|
||||||
|
@ -8,6 +8,6 @@ const {
|
|||||||
const APP = constantCase(process.env['APP_NAME']);
|
const APP = constantCase(process.env['APP_NAME']);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...require('./thunks'),
|
...require('@state/thunks'),
|
||||||
updateRouter: createAction(`${APP}/APP/UPDATE_ROUTER`)
|
updateRouter: createAction(`${APP}/APP/UPDATE_ROUTER`)
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const ReduxActions = require('redux-actions');
|
const ReduxActions = require('redux-actions');
|
||||||
const actions = require('../actions');
|
|
||||||
|
const actions = require('@state/actions');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
handleActions
|
handleActions
|
||||||
|
@ -6,7 +6,7 @@ const {
|
|||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
return combineReducers({
|
return combineReducers({
|
||||||
app: require('./app.js'),
|
app: require('@state/reducers/app'),
|
||||||
intl: require('./intl.js')
|
intl: require('@state/reducers/intl')
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -4,4 +4,6 @@ const {
|
|||||||
handleActions
|
handleActions
|
||||||
} = ReduxActions;
|
} = ReduxActions;
|
||||||
|
|
||||||
module.exports = handleActions({}, require('../../intl'));
|
module.exports = handleActions({
|
||||||
|
'x': (state) => state // somehow handleActions needs at least one reducer
|
||||||
|
}, require('@root/intl'));
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
const createLogger = require('redux-logger');
|
const createLogger = require('redux-logger');
|
||||||
const createReducer = require('./reducers');
|
|
||||||
const enableBatching = require('redux-batched-actions').enableBatching;
|
const enableBatching = require('redux-batched-actions').enableBatching;
|
||||||
const promiseMiddleware = require('redux-promise-middleware').default;
|
const promiseMiddleware = require('redux-promise-middleware').default;
|
||||||
const redux = require('redux');
|
const redux = require('redux');
|
||||||
const thunk = require('redux-thunk').default;
|
const thunk = require('redux-thunk').default;
|
||||||
|
|
||||||
|
const createReducer = require('@state/reducers');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
createStore,
|
createStore,
|
||||||
compose,
|
compose,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
...require('./app')
|
...require('@state/thunks/app')
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,6 @@ const Icon = ({
|
|||||||
iconSet = 'fa',
|
iconSet = 'fa',
|
||||||
style
|
style
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
const Component = require(`react-icons/lib/${iconSet}/${name}`);
|
const Component = require(`react-icons/lib/${iconSet}/${name}`);
|
||||||
|
|
||||||
const cn = classNames(
|
const cn = classNames(
|
||||||
|
Loading…
Reference in New Issue
Block a user