Matthew Raymer
1 year ago
commit
3f1e52277b
7 changed files with 1321 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||
*~ |
|||
node_modules |
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@ |
|||
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */ |
|||
|
|||
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */ |
File diff suppressed because it is too large
@ -0,0 +1,10 @@ |
|||
{ |
|||
"dependencies": { |
|||
"@noble/curves": "^1.2.0", |
|||
"@noble/hashes": "^1.3.2", |
|||
"tweetnacl": "^1.0.3", |
|||
"tweetnacl-util": "^0.15.1", |
|||
"webpack": "^5.89.0", |
|||
"webpack-cli": "^5.1.4" |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
const nacl = require("tweetnacl"); |
|||
const util = require("tweetnacl-util"); |
|||
|
|||
const secp256k1 = require('@noble/curves/secp256k1'); |
|||
const sha256$1 = require('@noble/hashes/sha256'); |
|||
|
|||
module.exports = { |
|||
nacl, |
|||
util, |
|||
secp256k1, |
|||
sha256: sha256$1 |
|||
}; |
@ -0,0 +1,18 @@ |
|||
const path = require('path'); |
|||
|
|||
module.exports = { |
|||
entry: './src/custom-module-entry.js', // File where you'll use and expose the libraries
|
|||
output: { |
|||
filename: 'custom-module-bundle.js', |
|||
path: path.resolve(__dirname, 'dist'), |
|||
library: 'customModule', |
|||
libraryTarget: 'var' |
|||
}, |
|||
mode: 'production', |
|||
target: 'webworker', |
|||
resolve: { |
|||
fallback: { |
|||
"crypto": false // This might be needed if some module tries to access node's crypto, which is not available in browsers
|
|||
} |
|||
} |
|||
}; |
Loading…
Reference in new issue