Use Webpack Aliases (#3711)
* Adds aliases to Webpack Build * Use `ui` Webpack alias * Use `views` alias * Use `modals` aliase * Use `providers` aliase * Use `contracts` aliase * Use '~' aliase * from `ui` to from `~/ui` * from to from * from `modals` to from `~/modals` * from `providers` to from `~/redux/providers` * from `contracts` to from `~/contracts` * Updated Webpack App config
This commit is contained in:
committed by
Jaco Greeff
parent
0c7b7fc8bc
commit
52b4ce0dd7
@@ -14,10 +14,10 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { newError } from '../ui/Errors/actions';
|
||||
import { newError } from '~/ui/Errors/actions';
|
||||
import { setAddressImage } from './providers/imagesActions';
|
||||
import { clearStatusLogs, toggleStatusLogs, toggleStatusRefresh } from './providers/statusActions';
|
||||
import { toggleView } from '../views/Settings/actions';
|
||||
import { toggleView } from '~/views/Settings/actions';
|
||||
|
||||
export {
|
||||
newError,
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
import thunk from 'redux-thunk';
|
||||
|
||||
import ErrorsMiddleware from '../ui/Errors/middleware';
|
||||
import SettingsMiddleware from '../views/Settings/middleware';
|
||||
import ErrorsMiddleware from '~/ui/Errors/middleware';
|
||||
import SettingsMiddleware from '~/views/Settings/middleware';
|
||||
import SignerMiddleware from './providers/signerMiddleware';
|
||||
|
||||
import statusMiddleware from '../views/Status/middleware';
|
||||
import statusMiddleware from '~/views/Status/middleware';
|
||||
import CertificationsMiddleware from './providers/certifications/middleware';
|
||||
|
||||
export default function (api) {
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
import { throttle } from 'lodash';
|
||||
|
||||
import { loadTokens, setTokenReg, fetchBalances, fetchTokens, fetchTokensBalances } from './balancesActions';
|
||||
import { padRight } from '../../api/util/format';
|
||||
import { padRight } from '~/api/util/format';
|
||||
|
||||
import Contracts from '../../contracts';
|
||||
import Contracts from '~/contracts';
|
||||
|
||||
export default class Balances {
|
||||
constructor (store, api) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import { range, uniq, isEqual } from 'lodash';
|
||||
import { hashToImageUrl } from './imagesReducer';
|
||||
import { setAddressImage } from './imagesActions';
|
||||
|
||||
import * as ABIS from '../../contracts/abi';
|
||||
import * as ABIS from '~/contracts/abi';
|
||||
import imagesEthereum from '../../../assets/images/contracts/ethereum-black-64x64.png';
|
||||
|
||||
const ETH = {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import Contracts from '../../contracts';
|
||||
import Contracts from '~/contracts';
|
||||
|
||||
export function setBlock (blockNumber, block) {
|
||||
return {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import Contracts from '../../../contracts';
|
||||
import Contracts from '~/contracts';
|
||||
import { addCertification } from './actions';
|
||||
|
||||
const knownCertifiers = [ 'smsverification' ];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { handleActions } from 'redux-actions';
|
||||
import { bytesToHex } from '../../api/util/format';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
|
||||
const ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import * as actions from './signerActions';
|
||||
|
||||
import { inHex } from '../../api/format/input';
|
||||
import { inHex } from '~/api/format/input';
|
||||
import { Wallet } from '../../util/wallet';
|
||||
|
||||
export default class SignerMiddleware {
|
||||
|
||||
@@ -20,9 +20,9 @@ import { routerReducer } from 'react-router-redux';
|
||||
import { apiReducer, balancesReducer, blockchainReducer, compilerReducer, imagesReducer, personalReducer, signerReducer, statusReducer as nodeStatusReducer, snackbarReducer } from './providers';
|
||||
import certificationsReducer from './providers/certifications/reducer';
|
||||
|
||||
import errorReducer from '../ui/Errors/reducers';
|
||||
import settingsReducer from '../views/Settings/reducers';
|
||||
import tooltipReducer from '../ui/Tooltips/reducers';
|
||||
import errorReducer from '~/ui/Errors/reducers';
|
||||
import settingsReducer from '~/views/Settings/reducers';
|
||||
import tooltipReducer from '~/ui/Tooltips/reducers';
|
||||
|
||||
export default function () {
|
||||
return combineReducers({
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { hashToImageUrl } from './providers/imagesReducer';
|
||||
import { withError } from '../ui/Errors/middleware';
|
||||
import { withError } from '~/ui/Errors/middleware';
|
||||
|
||||
export {
|
||||
hashToImageUrl,
|
||||
|
||||
Reference in New Issue
Block a user