5min

Angular

Install the sdk with npm

Windows
|

Since webpack 5 no longer includes polyfills for the node.js core modules, they need to be added to webpack configuration.

This is done by first installing @angular-builders/custom-webpack and node-polyfill-webpack-plugin packages

Windows
|

Then angular.json file needs to be edited, from that file, first locate line containing

JS
|

and replace it with

JS
|

then inside architect.build.options add following property:

TypeScript
|

to have the custom webpack configuration to be used also by the development server, locale also following line

"builder": "@angular-devkit/build:dev-server"

and replace it with

"builder": "@angular-builders/custom-webpack:dev-server"

next create a file called custom-webpack.config.js and addi it to the project root. After creating the file, add the following content to that file:

TypeScript
|

Now SDK should work in Angular module:

TypeScript
|



Updated 08 Feb 2022
Did this page help?
Yes
No