Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack CI test #1332

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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