Skip to content

Commit

Permalink
Add webpack CI test (#1332)
Browse files Browse the repository at this point in the history
* Add webpack CI test

* generic import

---------

Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
Thoralf-M and thibault-martinez committed Sep 27, 2023
1 parent 8291689 commit bd96aee
Show file tree
Hide file tree
Showing 5 changed files with 490 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/bindings-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ jobs:
yarn
yarn build
- name: Test types module webpack compatibility
working-directory: bindings/nodejs/
run: |
yarn run test-webpack
lint:
name: Lint
if: ${{ ! github.event.schedule }}
Expand Down
5 changes: 4 additions & 1 deletion bindings/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"rebuild": "node scripts/neon-build && tsc && node scripts/strip.js",
"install": "prebuild-install --runtime napi --tag-prefix=iota-sdk-nodejs-v && tsc || npm run rebuild",
"test": "jest",
"test-webpack": "cd tests/webpack && webpack-cli build --config ./webpack.config.js ",
"create-api-docs": "typedoc ./lib/index.ts --githubPages false --disableSources --excludePrivate --excludeInternal --plugin typedoc-plugin-markdown --theme markdown --hideBreadcrumbs --entryDocument api_ref.md --readme none --hideGenerator --sort source-order"
},
"author": "IOTA Foundation <[email protected]>",
Expand All @@ -46,7 +47,9 @@
"prettier": "^2.8.3",
"ts-jest": "^29.0.5",
"typedoc": "^0.24.6",
"typedoc-plugin-markdown": "^3.14.0"
"typedoc-plugin-markdown": "^3.14.0",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
},
"overrides": {
"tar@<=4.4.17": "^4.4.19",
Expand Down
1 change: 1 addition & 0 deletions bindings/nodejs/tests/webpack/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import * as types from '../../out/types';
10 changes: 10 additions & 0 deletions bindings/nodejs/tests/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

module.exports = {
entry: './index.js',
mode: 'development',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
}
};
Loading

0 comments on commit bd96aee

Please sign in to comment.