beginning to decompose cryptofill to allow dynamic import

This commit is contained in:
Danny Coates 2019-02-21 12:22:12 -08:00
parent c146c584f6
commit 9e919eddb5
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
5 changed files with 6 additions and 3704 deletions

View File

@ -46,7 +46,8 @@ async function checkCrypto() {
return true;
} catch (err) {
try {
require('./cryptofill');
window.asmCrypto = await import('asmcrypto.js');
await import('./cryptofill');
return true;
} catch (e) {
return false;

File diff suppressed because it is too large Load Diff

6
package-lock.json generated
View File

@ -1743,9 +1743,9 @@
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
},
"asmcrypto.js": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz",
"integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==",
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz",
"integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==",
"dev": true
},
"asn1": {

View File

@ -67,7 +67,7 @@
"@dannycoates/webpack-dev-server": "^3.1.4",
"@fullhuman/postcss-purgecss": "^1.1.0",
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
"asmcrypto.js": "^2.3.2",
"asmcrypto.js": "^0.22.0",
"babel-loader": "^8.0.5",
"babel-plugin-istanbul": "^5.1.1",
"base64-js": "^1.3.0",

View File

@ -90,10 +90,6 @@ const web = {
{
test: /\.js$/,
oneOf: [
{
include: [require.resolve('./app/cryptofill')],
use: ['script-loader']
},
{
loader: 'babel-loader',
include: [