From 876cd603f18b17f059bb635fde56f99f10601d29 Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Sat, 11 May 2019 20:21:48 +0530 Subject: [PATCH] docs(docs-infra): remove deprecated `Buffer` usage from stackblitz builder (#30369) Fixes #30364 PR Close #30369 --- aio/tools/stackblitz-builder/builder.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aio/tools/stackblitz-builder/builder.js b/aio/tools/stackblitz-builder/builder.js index 35ad2b2745..00da191c95 100644 --- a/aio/tools/stackblitz-builder/builder.js +++ b/aio/tools/stackblitz-builder/builder.js @@ -221,9 +221,7 @@ class StackblitzBuilder { _encodeBase64(file) { // read binary data - var bitmap = fs.readFileSync(file); - // convert binary data to base64 encoded string - return Buffer(bitmap).toString('base64'); + return fs.readFileSync(file, { encoding: 'base64' }); } _existsSync(filename) {