fixed reopened issue with webpack. Fixes #6

This commit is contained in:
Juan Hernández Serrano 2021-10-06 18:49:42 +02:00
parent 622fd0922a
commit c6084b634d
8 changed files with 2073 additions and 1099 deletions

View File

@ -66,6 +66,10 @@ export default [
IS_BROWSER: true, IS_BROWSER: true,
preventAssignment: true preventAssignment: true
}), }),
resolve({
browser: true,
exportConditions: ['browser', 'module', 'import', 'default']
}),
typescriptPlugin(tsBundleOptions) typescriptPlugin(tsBundleOptions)
], ],
external external
@ -120,6 +124,10 @@ export default [
declarationDir: 'types', declarationDir: 'types',
declarationMap: true declarationMap: true
}), }),
resolve({
browser: true,
exportConditions: ['node', 'module', 'require']
}),
commonjs({ extensions: ['.js', '.cjs', '.ts'] }), // the ".ts" extension is required commonjs({ extensions: ['.js', '.cjs', '.ts'] }), // the ".ts" extension is required
moveDirPlugin(join(rootDir, dirname(exports['.'].node.import), 'types'), join(rootDir, dirname(types))) moveDirPlugin(join(rootDir, dirname(exports['.'].node.import), 'types'), join(rootDir, dirname(types)))
], ],
@ -145,6 +153,10 @@ export default [
preventAssignment: true preventAssignment: true
}), }),
typescriptPlugin(tsBundleOptions), typescriptPlugin(tsBundleOptions),
resolve({
browser: true,
exportConditions: ['node', 'module', 'require']
}),
commonjs({ extensions: ['.js', '.cjs', '.ts'] }) // the ".ts" extension is required commonjs({ extensions: ['.js', '.cjs', '.ts'] }) // the ".ts" extension is required
] ]
} }

File diff suppressed because one or more lines are too long

332
dist/cjs/index.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

265
dist/esm/index.node.js vendored

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@ The absolute value of a
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/abs.d.ts:8 node_modules/bigint-mod-arith/types/abs.d.ts:8
___ ___
@ -69,7 +69,7 @@ The bit length
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/bitLength.d.ts:7 node_modules/bigint-mod-arith/types/bitLength.d.ts:7
___ ___
@ -98,7 +98,7 @@ A triple (g, x, y), such that ax + by = g = gcd(a, b).
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/egcd.d.ts:18 node_modules/bigint-mod-arith/types/egcd.d.ts:18
___ ___
@ -123,7 +123,7 @@ The greatest common divisor of a and b
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/gcd.d.ts:9 node_modules/bigint-mod-arith/types/gcd.d.ts:9
___ ___
@ -153,7 +153,7 @@ A promise that resolves to a boolean that is either true (a probably prime numbe
#### Defined in #### Defined in
[src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/isProbablyPrime.ts#L21) [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/isProbablyPrime.ts#L21)
___ ___
@ -178,7 +178,7 @@ The least common multiple of a and b
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/lcm.d.ts:8 node_modules/bigint-mod-arith/types/lcm.d.ts:8
___ ___
@ -203,7 +203,7 @@ Maximum of numbers a and b
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/max.d.ts:9 node_modules/bigint-mod-arith/types/max.d.ts:9
___ ___
@ -228,7 +228,7 @@ Minimum of numbers a and b
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/min.d.ts:9 node_modules/bigint-mod-arith/types/min.d.ts:9
___ ___
@ -256,7 +256,7 @@ The inverse modulo n
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/modInv.d.ts:12 node_modules/bigint-mod-arith/types/modInv.d.ts:12
___ ___
@ -285,7 +285,7 @@ b**e mod n
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/modPow.d.ts:13 node_modules/bigint-mod-arith/types/modPow.d.ts:13
___ ___
@ -317,7 +317,7 @@ A promise that resolves to a bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/prime.ts#L21) [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/prime.ts#L21)
___ ___
@ -346,7 +346,7 @@ A bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/prime.ts#L100) [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/prime.ts#L100)
___ ___
@ -374,7 +374,7 @@ A cryptographically secure random bigint between [min,max]
#### Defined in #### Defined in
[src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/randBetween.ts#L15) [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/randBetween.ts#L15)
___ ___
@ -402,7 +402,7 @@ A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/randBits.ts#L14) [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/randBits.ts#L14)
___ ___
@ -430,7 +430,7 @@ A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/randBits.ts#L45) [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/randBits.ts#L45)
___ ___
@ -458,7 +458,7 @@ A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/randBytes.ts#L12) [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/randBytes.ts#L12)
___ ___
@ -486,7 +486,7 @@ A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/9c4cd84/src/ts/randBytes.ts#L46) [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/622fd09/src/ts/randBytes.ts#L46)
___ ___
@ -517,4 +517,4 @@ A bigint with the smallest positive representation of a modulo n
#### Defined in #### Defined in
node_modules/bigint-mod-arith/dist/esm/types/ts/toZn.d.ts:15 node_modules/bigint-mod-arith/types/toZn.d.ts:15

1943
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -87,13 +87,14 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-multi-entry": "^4.0.0", "@rollup/plugin-multi-entry": "^4.0.0",
"@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-replace": "^3.0.0", "@rollup/plugin-replace": "^3.0.0",
"@rollup/plugin-typescript": "^8.2.0", "@rollup/plugin-typescript": "^8.2.0",
"@types/chai": "^4.2.14", "@types/chai": "^4.2.14",
"@types/mocha": "^9.0.0", "@types/mocha": "^9.0.0",
"bigint-mod-arith": "^3.0.1",
"chai": "^4.3.3", "chai": "^4.3.3",
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"glob": "^7.1.6", "glob": "^7.1.6",
@ -109,11 +110,8 @@
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"ts-standard": "^10.0.0", "ts-standard": "^10.0.0",
"tslib": "^2.1.0", "tslib": "^2.1.0",
"typedoc": "^0.21.5", "typedoc": "^0.22.0",
"typedoc-plugin-markdown": "^3.6.0", "typedoc-plugin-markdown": "^3.6.0",
"typescript": "^4.2.2" "typescript": "^4.2.2"
},
"dependencies": {
"bigint-mod-arith": "^3.0.0"
} }
} }