Skip to content

Commit

Permalink
Merge pull request #140 from ecadlabs/angular-webpack-patch
Browse files Browse the repository at this point in the history
Fixed angular webpack config path in postinstall patch script
  • Loading branch information
carte7000 authored Oct 11, 2019
2 parents 016f211 + 80f2e90 commit 57323c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/taquito/patch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');
const angularWebpackConfig =
'./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';
'../../@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';

if (fs.existsSync(angularWebpackConfig)) {
// Patch Angular webpack config to include necessary core Node modules in a bundle
Expand All @@ -10,6 +10,8 @@ if (fs.existsSync(angularWebpackConfig)) {
}
var result = data.replace(/node: false/g, 'node: {crypto: true, stream: true}');

console.log('Patching angular webpack config');

fs.writeFile(angularWebpackConfig, result, 'utf8', function(err) {
if (err) return console.log(err);
});
Expand Down

0 comments on commit 57323c7

Please sign in to comment.