Build embedded Parity JS properly and separatly (#4426)
* Add a specific embed webpack build // output assets in JSON * WIP Embed * Updated Webpack * Update exports // Webpack config * Fix app build fail * Fix NPm scripts * Reduce Embed dependencies * Fix NPM exports * remvoe stats * Lazy-Load worker (not to load in embed) * PR Grumbles + Fix tests
This commit is contained in:
committed by
Jaco Greeff
parent
656c08976f
commit
e8175f4cca
23
js/src/redux/providers/workerWrapper.js
Normal file
23
js/src/redux/providers/workerWrapper.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if (!process.env.EMBED) {
|
||||
const setupWorker = require('./worker').setupWorker;
|
||||
|
||||
module.exports = { setupWorker };
|
||||
} else {
|
||||
module.exports = { setupWorker: () => {} };
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import initMiddleware from './middleware';
|
||||
import initReducers from './reducers';
|
||||
|
||||
import { load as loadWallet } from './providers/walletActions';
|
||||
import { setupWorker } from './providers/worker';
|
||||
import { setupWorker } from './providers/workerWrapper';
|
||||
|
||||
import {
|
||||
Balances as BalancesProvider,
|
||||
|
||||
Reference in New Issue
Block a user