Skip to content

Commit

Permalink
trying to build es6 together
Browse files Browse the repository at this point in the history
  • Loading branch information
igormcoelho committed May 26, 2020
1 parent a0e5c7f commit 8426d28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## version 4.x (dev)

- In order to enforce standard with C#, C++ and other related projects, we will adopt string base16 constructor ALWAYS as BigEndian. This removes the "strange" difference between building "0001" and "0x0001" (the former was not usually ONE... now it will be). In basic words `0x` prefix will be optional for string base16. Unfortunately, this may break compatibility with someone out there, so we will increase a MAJOR.
- `npm run build` now puts two files in `dist/`: classic `csbiginteger.js` and `csbiginteger.mjs` (es6 module)

## version 3.x

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/jest --coverage",
"build": "./node_modules/.bin/webpack"
"build": "./node_modules/.bin/webpack --config webpack.config.js && ./node_modules/.bin/webpack --config webpack-es6.config.js"
},
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions webpack-es6.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
mode: "production",
entry: "./index.js",
output: {
library: 'csbiginteger',
libraryTarget: 'var',
filename: './csbiginteger.mjs',
auxiliaryComment: 'csBigInteger.js library'
}
}

0 comments on commit 8426d28

Please sign in to comment.